Code coverage tests

This page documents the degree to which the PARI/GP source code is tested by our public test suite, distributed with the source distribution in directory src/test/. This is measured by the gcov utility; we then process gcov output using the lcov frond-end.

We test a few variants depending on Configure flags on the pari.math.u-bordeaux1.fr machine (x86_64 architecture), and agregate them in the final report:

The target is 90% coverage for all mathematical modules (given that branches depending on DEBUGLEVEL or DEBUGMEM are not covered). This script is run to produce the results below.

LCOV - code coverage report
Current view: top level - headers - pariinl.h (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 17707-04f73e4) Lines: 1172 1315 89.1 %
Date: 2015-03-29 Functions: 484 550 88.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 516 620 83.2 %

Function Name Sort by function name Hit count Sort by hit count
F2m_clear 0
F2m_coeff 11753530
F2m_copy 1449
F2m_flip 336194
F2m_set 1549002
F2v_clear 2112346
F2v_coeff 95742365
F2v_copy 0
F2v_ei 7
F2v_flip 336194
F2v_set 13118299
F2v_to_F2x 6015
F2x_clear 2112346
F2x_coeff 98256148
F2x_div 1134858
F2x_equal 1105842
F2x_equal1 1528
F2x_flip 336194
F2x_renormalize 55428777
F2x_set 32266247
Flm_copy 473420
Flm_row 28085
Flv_copy 1026370
Flx_copy 45645102
Flx_div 1502947
Flx_equal1 3738245
Flx_lead 349214
Flx_mulu 200026
FlxqX_div 6146
FlxqX_rem 161228
Flxq_add 0
Flxq_sub 0
FpV_FpC_mul 0
FpXQX_div 0
FpXQX_renormalize 826230
FpXQ_add 0
FpXQ_sub 0
FpXX_renormalize 872964
FpX_div 518710
FpX_renormalize 90121040
Fp_add 173023531
Fp_addmul 2376490
Fp_center 3090932
Fp_div 4452496
Fp_halve 16306
Fp_inv 7423320
Fp_invsafe 342893
Fp_mul 147153077
Fp_muls 231
Fp_mulu 60547079
Fp_neg 9645526
Fp_red 2903736
Fp_sqr 6314668
Fp_sub 61401525
FqXQ_add 0
FqXQ_div 16852
FqXQ_inv 0
FqXQ_invsafe 0
FqXQ_mul 107547
FqXQ_pow 0
FqXQ_sqr 39900
FqXQ_sub 0
FqX_Fp_mul 452339
FqX_Fq_mul 467870
FqX_add 768895
FqX_div 9611
FqX_div_by_X_x 5831
FqX_divrem 0
FqX_extgcd 37184
FqX_gcd 38262
FqX_mul 82915
FqX_mulu 389710
FqX_neg 4028
FqX_powu 994
FqX_red 7854
FqX_rem 26252
FqX_sqr 4270
FqX_sub 104264
Fq_red 1532674
Fq_to_FpXQ 3614
GENbinbase 53980385
QV_isscalar 5463675
Q_abs 312902
Q_abs_shallow 37838
RgC_fpnorml2 242522
RgC_gtofp 379113
RgC_gtomp 560
RgM_dimensions 115445
RgM_fpnorml2 1498
RgM_gtofp 18934
RgM_gtomp 14
RgM_inv 29853
RgM_minor 504
RgM_shallowcopy 4837689
RgV_is_QV 0
RgV_is_ZV 1274573
RgV_isscalar 6385
RgXQX_div 7
RgXQX_rem 31668
RgXQ_mul 395836
RgXQ_sqr 203988
RgX_coeff 5425
RgX_copy 62214455
RgX_div 6054098
RgX_equal_var 4074292
RgX_fpnorml2 10204
RgX_gtofp 421666
RgX_is_QX 109326
RgX_is_ZX 55697256
RgX_is_monomial 14649188
RgX_is_rational 2408
RgX_isscalar 0
RgX_rem 2553602
RgX_renormalize 171017
RgX_shift_inplace 533809
RgX_shift_inplace_init 533804
Rg_col_ei 3276559
ZC_hnfrem 801009
ZM_hnfrem 26138
ZM_lll 1132573
ZV_dvd 23198
ZV_isscalar 1566268
ZV_to_zv 192939
ZXQ_mul 104524
ZXQ_sqr 17556
ZX_ZXY_resultant 0
ZX_equal1 12743
ZX_renormalize 77193804
Z_ispower 14
Z_issquare 231357
abgrp_get_cyc 892335
abgrp_get_gen 227568
abgrp_get_no 7994
absfrac 1326215
absfrac_shallow 11564
addmuliu 7000
addmuliu_inplace 263749109
affc_fixlg 15582
affgr 176947
bid_get_arch 98487
bid_get_cyc 461384
bid_get_gen 4984
bid_get_gen_nocheck 0
bid_get_grp 466886
bid_get_ideal 72892
bid_get_mod 287293
bid_get_no 0
bin_copy 26991167
bit_accuracy 1096716939
bit_accuracy_mul 2501677
bit_prec 23580533
bnf_get_clgp 465216
bnf_get_cyc 242527
bnf_get_fu 6733
bnf_get_fu_nocheck 12067
bnf_get_gen 221996
bnf_get_logfu 347063
bnf_get_nf 927920
bnf_get_no 553
bnf_get_reg 601
bnf_get_tuN 7567
bnf_get_tuU 6034
bnr_get_bid 172086
bnr_get_bnf 345985
bnr_get_clgp 196810
bnr_get_cyc 187906
bnr_get_gen 1393
bnr_get_gen_nocheck 70
bnr_get_mod 9149
bnr_get_nf 2219
bnr_get_no 7441
both_odd 15896685
cbrtr 11341
cgetalloc 4681
cgetc 33139
cgiv 42538851
closure_arity 97293021
closure_codestr 85322785
closure_get_code 0
closure_get_data 85202267
closure_get_dbg 57952
closure_get_frame 15530
closure_get_oper 85271733
closure_get_text 117626
closure_is_variadic 11992074
col_ei 1167975
const_col 19696
const_vec 5709994
const_vecsmall 3229759
constant_term 17427180
cxcompotor 1329779
cxnorm 6552676
cxtofp 663774
cyclic_perm 0
dbllog2r 19635859
degpol 1535889131
divsBIL 3168515433
ellQp_get_p 245
ellQp_get_prec 84
ellQp_get_zero 336
ellR_get_prec 245
ellR_get_sign 660
ell_get_a1 1967175
ell_get_a2 1409778
ell_get_a3 1982955
ell_get_a4 2022545
ell_get_a6 2432374
ell_get_b2 2006223
ell_get_b4 433588
ell_get_b6 824930
ell_get_b8 688457
ell_get_c4 4710537
ell_get_c6 5070029
ell_get_disc 6408680
ell_get_j 897463
ell_get_type 6728439
ell_is_inf 17944537
ellff_get_a4a6 258912
ellff_get_field 603837
ellinf 402728
ellnf_get_nf 52885
equali1 169563830
equalim1 5707399
err_get_compo 77
err_get_num 130025
gabsz 0
gaddgs 1092274
gaddz 23318
gal_get_den 1631
gal_get_e 42
gal_get_gen 875
gal_get_group 840
gal_get_invvdm 1631
gal_get_mod 1617
gal_get_orders 413
gal_get_p 924
gal_get_pol 917
gal_get_roots 1974
gcmpgs 18542
gdiventz 0
gdivsg 94536
gdivz 0
gen_I 175777
gener_Fq_local 462
gequalgs 22435
gerepileall 4178092
gerepilecoeffs 8
gerepilecopy 19493579
gerepilemany 37056
gerepileupto 414823935
gerepileuptoint 1009405804
gerepileuptoleaf 303948823
gmaxsg 0
gminsg 0
gmodz 0
gmul2nz 0
gmulgs 2680026
gmulz 11673
gnegz 0
gshiftz 0
gsubgs 392082
gsubz 0
gtodouble 24435622
gtofp 15818729
gtomp 22400
gtos 29752249
gtou 0
gval 427
icopy_avma 964210032
idealpseudomin 149488
idealpseudomin_nonscalar 230279
idealred 148705
idealred_elt 315
identity_perm 64470
inf_get_sign 18601
is_bigint 114805500
is_const_t 659853798
is_extscalar_t 591132
is_intreal_t 492852
is_matvec_t 303588803
is_noncalc_t 50352324
is_pm1 1111259553
is_rational_t 416504
is_recursive_t 2022935583
is_scalar_t 150506978
is_universal_constant 28991755
is_vec_t 268968
isint1 5000156
isintm1 301
isintzero 250351120
ismpzero 492775
isonstack 1770598331
killblock 991568
leading_term 63548712
leafcopy_avma 47481630
lgcols 23914469
lgpol 738145867
lincombii 17976984
matpascal 273
mkcol 622508
mkcol2 12821449
mkcol2s 0
mkcol3 40369
mkcol3s 0
mkcol4 0
mkcol4s 0
mkcol5 0
mkcol6 337
mkcolcopy 27232
mkcols 0
mkcomplex 2371941
mkerr 0
mkfrac 43293
mkfraccopy 2394609
mkintmod 378895
mkintmodu 3675
mkmat 186485
mkmat2 9925320
mkmat3 2345
mkmat4 0
mkmat5 0
mkmatcopy 7203
mkmoo 5662
mkoo 9276
mkpolmod 238917
mkqfi 158109
mkquad 42
mkrfrac 7
mkrfraccopy 14
mkvec 2401942
mkvec2 11087594
mkvec2copy 167444
mkvec2s 10395
mkvec3 78604651
mkvec3s 492702
mkvec4 3588739
mkvec4s 7
mkvec5 11480588
mkveccopy 33180
mkvecs 7
mkvecsmall 29195987
mkvecsmall2 91862507
mkvecsmall3 35633275
mkvecsmall4 1480943
mkvecsmall5 104716
modpr_get_T 763361
modpr_get_p 2331
modpr_get_pr 1709061
mpcosz 0
mpexpz 0
mplogz 0
mpsinz 0
mul_content 238621
mul_denom 176809
mulsubii 1721663
nbits2extraprec 299841673
nbits2lg 2651185
nbits2nlong 688768
nbits2prec 70030461
nbrows 12651193
nchar2nlong 8675101
ndec2nlong 13698
ndec2prec 13698
nf_get_G 42239
nf_get_M 876961
nf_get_Tr 784
nf_get_degree 2590687
nf_get_diff 798
nf_get_disc 20533
nf_get_index 488077
nf_get_invzk 1085150
nf_get_pol 5688635
nf_get_r1 966823
nf_get_r2 1043
nf_get_ramified_primes 7
nf_get_roots 86051
nf_get_roundG 337628
nf_get_sign 3888
nf_get_varn 4325
nf_get_zk 5563508
normalize_frac 5949707
odd 276197180
pari_calloc 35486
pari_err_BUG 14
pari_err_COMPONENT 210
pari_err_CONSTPOL 7
pari_err_COPRIME 42
pari_err_DIM 827
pari_err_DOMAIN 5012
pari_err_FILE 0
pari_err_FLAG 21
pari_err_IMPL 224
pari_err_INV 697
pari_err_IRREDPOL 14
pari_err_MAXPRIME 0
pari_err_MODULUS 714
pari_err_OP 315
pari_err_OVERFLOW 63
pari_err_PACKAGE 0
pari_err_PREC 218
pari_err_PRIME 35
pari_err_PRIORITY 84
pari_err_ROOTS0 35
pari_err_SQRTN 77
pari_err_TYPE 36304
pari_err_TYPE2 2821
pari_err_VAR 490
pari_free 35781272
pari_malloc 106845981
pari_realloc 104673
pari_stack_alloc 225268243
pari_stack_base 225363012
pari_stack_delete 27303
pari_stack_init 54511
pari_stack_new 197790507
pari_stack_pushp 9180
perm_conj 35
perm_inv 98
perm_mul 18123419
pol0_F2x 2018179
pol0_Flx 27251473
pol1_F2x 541582
pol1_Flx 9695532
pol_0 12044373
pol_1 667460
pol_x 320861
polx_F2x 188998
polx_Flx 5979561
polx_zx 0
powIs 805
powii 313863
pr_get_e 1208573
pr_get_f 5293873
pr_get_gen 2345635
pr_get_p 8246377
pr_get_tau 4704648
pr_is_inert 491085
pr_norm 60957
prec2nbits 53025685
prec2nbits_mul 67956
prec2ndec 5700
precdbl 1667
qfb_disc 3716345
qfb_disc3 3786639
quad_disc 175
quadnorm 623
remsBIL 3094517319
resultant 25696
rnf_get_absdegree 155869
rnf_get_alpha 455
rnf_get_degree 310786
rnf_get_disc 63
rnf_get_idealdisc 420
rnf_get_index 98
rnf_get_invzk 1057
rnf_get_k 455
rnf_get_map 33929
rnf_get_nf 122577
rnf_get_nfdegree 15547
rnf_get_nfpol 107716
rnf_get_nfvarn 490
rnf_get_nfzk 6181
rnf_get_pol 461510
rnf_get_polabs 83013
rnf_get_varn 0
rnf_get_zk 3157
row 113245
row_i 2093
rowcopy 56
rowpermute 141860
rowslice 104066
rowslicepermute 19698
ser_isexactzero 608108
shallowcopy 204123
sqrfrac 110738
sqrti 2448862
sqrtnr 31864
sqrtr 6635982
sturm 441
submulii 41116623
submuliu 7000
submuliu_inplace 264312489
truecoeff 0
trunc_safe 0
vec_append 54894
vec_ei 303822
vec_lengthen 7574
vec_setconst 1701
vec_shorten 0
vec_to_vecsmall 203593
vecpermute 4338884
vecreverse 50869
vecreverse_inplace 225
vecslice 1727522
vecslicepermute 86632
vecsmall_append 357089
vecsmall_coincidence 0
vecsmall_concat 230658
vecsmall_copy 24684080
vecsmall_ei 7196
vecsmall_indexmax 14
vecsmall_indexmin 14
vecsmall_isin 111174
vecsmall_lengthen 448
vecsmall_lexcmp 2586374
vecsmall_max 2577
vecsmall_min 0
vecsmall_pack 84
vecsmall_prefixcmp 35286195
vecsmall_prepend 784
vecsmall_shorten 4536
vecsmall_to_col 446364
vecsmall_to_vec 7559
vecsmallpermute 17816147
vecsmalltrunc_append 2281459
vecsmalltrunc_init 1201824
vecsplice 4984
vectrunc_append 1112017
vectrunc_append_batch 0
vectrunc_init 700682
zc_to_ZC 427324
zero_F2m 0
zero_F2m_copy 96559
zero_F2v 681969
zero_F2x 77
zero_Flm 315
zero_Flm_copy 23532
zero_Flv 19203263
zero_Flx 83291
zero_zm 0
zero_zv 13280982
zero_zx 0
zerocol 22561398
zeromat 5600
zeromatcopy 1984809
zeropadic 271880
zeropadic_shallow 315
zeropol 4347346
zeroser 5005
zerovec 5738589
zm_copy 0
zm_row 0
zm_to_zxV 0
zm_transpose 91
zv_copy 729220
zv_to_ZV 6370
zv_to_zx 0
zx_renormalize 0
zx_shift 0
zx_to_zv 0

Generated by: LCOV version 1.9