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 17097-9391e68) Lines: 1154 1298 88.9 %
Date: 2014-11-21 Functions: 475 543 87.5 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 502 610 82.3 %

Function Name Sort by function name Hit count Sort by hit count
F2m_clear 0
F2m_coeff 9917492
F2m_copy 1020
F2m_flip 238373
F2m_set 1571959
F2v_clear 1325426
F2v_coeff 58455904
F2v_copy 0
F2v_ei 5
F2v_flip 238373
F2v_set 10315380
F2v_to_F2x 4290
F2x_clear 1325426
F2x_coeff 58881467
F2x_div 667085
F2x_equal 647617
F2x_equal1 1072
F2x_flip 238373
F2x_renormalize 37140821
F2x_set 22853030
Flm_copy 328358
Flv_copy 662354
Flx_copy 30899604
Flx_div 951929
Flx_equal1 2148618
Flx_lead 47594
Flx_mulu 142872
FlxqX_div 4180
FlxqX_rem 111310
Flxq_add 0
Flxq_sub 0
FpV_FpC_mul 0
FpXQX_div 0
FpXQX_renormalize 436592
FpXQ_add 0
FpXQ_sub 0
FpXX_renormalize 333839
FpX_div 343912
FpX_renormalize 59142551
Fp_add 25693965
Fp_addmul 1689640
Fp_center 2108911
Fp_div 1704174
Fp_halve 11424
Fp_inv 3750692
Fp_invsafe 230941
Fp_mul 17369111
Fp_muls 165
Fp_mulu 16549064
Fp_neg 6655813
Fp_red 2027523
Fp_sqr 2064528
Fp_sub 37112474
FqXQ_add 0
FqXQ_div 11916
FqXQ_inv 0
FqXQ_invsafe 0
FqXQ_mul 75579
FqXQ_pow 0
FqXQ_sqr 27848
FqXQ_sub 0
FqX_Fp_mul 319212
FqX_Fq_mul 331491
FqX_add 545681
FqX_div 5860
FqX_div_by_X_x 4115
FqX_divrem 0
FqX_extgcd 25310
FqX_gcd 25945
FqX_mul 57545
FqX_mulu 276214
FqX_neg 2840
FqX_powu 695
FqX_red 5475
FqX_rem 17905
FqX_sqr 2985
FqX_sub 73635
Fq_red 960937
GENbinbase 37096548
QV_isscalar 3733102
Q_abs 202055
Q_abs_shallow 20295
RgC_fpnorml2 171560
RgC_gtofp 264727
RgC_gtomp 400
RgM_dimensions 81338
RgM_fpnorml2 945
RgM_gtofp 12999
RgM_gtomp 10
RgM_inv 20044
RgM_minor 165
RgM_shallowcopy 3307929
RgV_is_QV 0
RgV_is_ZV 902325
RgV_isscalar 4500
RgXQX_div 5
RgXQX_rem 7080
RgXQ_mul 203574
RgXQ_sqr 100196
RgX_coeff 3875
RgX_copy 41158133
RgX_div 4498406
RgX_equal_var 754468
RgX_fpnorml2 6690
RgX_gtofp 274485
RgX_is_QX 4910
RgX_is_ZX 38790006
RgX_is_monomial 10660336
RgX_is_rational 1005
RgX_isscalar 0
RgX_rem 1015955
RgX_renormalize 122155
RgX_shift_inplace 359386
RgX_shift_inplace_init 359386
Rg_col_ei 2222786
ZC_hnfrem 558314
ZM_hnfrem 18290
ZM_lll 773814
ZV_dvd 16570
ZV_isscalar 867329
ZV_to_zv 137730
ZXQ_mul 70415
ZXQ_sqr 10535
ZX_ZXY_resultant 0
ZX_equal1 9755
ZX_renormalize 50205634
Z_ispower 10
Z_issquare 165001
abgrp_get_cyc 630465
abgrp_get_gen 160916
abgrp_get_no 5645
absfrac 871578
absfrac_shallow 5475
addmuliu 5000
addmuliu_inplace 177400604
affc_fixlg 18960
affgr 2265754
bid_get_arch 70046
bid_get_cyc 326003
bid_get_gen 3450
bid_get_gen_nocheck 0
bid_get_grp 329823
bid_get_ideal 51685
bid_get_mod 202156
bid_get_no 0
bin_copy 18551720
bit_accuracy 719793342
bit_accuracy_mul 1538573
bit_prec 15653455
bnf_get_clgp 328997
bnf_get_cyc 171456
bnf_get_fu 4509
bnf_get_fu_nocheck 8109
bnf_get_gen 157046
bnf_get_logfu 243937
bnf_get_nf 641648
bnf_get_no 395
bnf_get_reg 275
bnf_get_tuN 5125
bnf_get_tuU 4040
bnr_get_bid 121641
bnr_get_bnf 244482
bnr_get_clgp 138921
bnr_get_cyc 132636
bnr_get_gen 985
bnr_get_gen_nocheck 50
bnr_get_mod 6430
bnr_get_nf 1495
bnr_get_no 5250
both_odd 25439762
cgetalloc 1899
cgetc 36994
cgiv 28416893
closure_arity 65729834
closure_codestr 57328034
closure_get_code 0
closure_get_data 57323509
closure_get_dbg 4640
closure_get_frame 835
closure_get_oper 57328034
closure_get_text 9725
closure_is_variadic 8398745
col_ei 783875
const_col 11666
const_vec 3892164
const_vecsmall 2197178
constant_term 12447536
cxcompotor 890463
cxnorm 3951004
cxtofp 444615
cyclic_perm 0
dbllog2r 9347395
degpol 972685912
divsBIL 2125210264
ellQp_get_p 175
ellQp_get_prec 60
ellQp_get_zero 240
ellR_get_prec 175
ellR_get_sign 417
ell_get_a1 1404541
ell_get_a2 1006766
ell_get_a3 1415906
ell_get_a4 1444551
ell_get_a6 1737366
ell_get_b2 1432746
ell_get_b4 309696
ell_get_b6 589196
ell_get_b8 491755
ell_get_c4 3366098
ell_get_c6 3622898
ell_get_disc 4483380
ell_get_j 641025
ell_get_type 4813206
ell_is_inf 11471391
ellff_get_a4a6 184505
ellff_get_field 430525
ellinf 290674
ellnf_get_nf 37760
equali1 116048023
equalim1 41513
err_get_compo 55
err_get_num 19356
gabsz 0
gaddgs 984671
gaddz 16494
gal_get_den 1080
gal_get_e 30
gal_get_gen 625
gal_get_group 565
gal_get_invvdm 1080
gal_get_mod 1070
gal_get_orders 295
gal_get_p 660
gal_get_pol 620
gal_get_roots 1325
gcmpgs 6935
gdiventz 0
gdivsg 73029
gdivz 0
gen_I 117488
gener_Fq_local 280
gequalgs 16025
gerepileall 2945442
gerepilecoeffs 6
gerepilecopy 13270971
gerepilemany 25975
gerepileupto 268555537
gerepileuptoint 655615770
gerepileuptoleaf 168571927
gmaxsg 0
gminsg 0
gmodz 0
gmul2nz 0
gmulgs 1691864
gmulz 8257
gnegz 0
gshiftz 0
gsubgs 269194
gsubz 0
gtodouble 3783202
gtofp 5908131
gtomp 16000
gtos 21224748
gtou 0
gval 290
icopy_avma 602144713
idealpseudomin 101169
idealpseudomin_nonscalar 156913
idealred 100670
idealred_elt 220
identity_perm 45515
inf_get_sign 8271
is_bigint 78478375
is_const_t 394999335
is_extscalar_t 392290
is_intreal_t 357765
is_matvec_t 211638451
is_noncalc_t 35937812
is_pm1 543178693
is_rational_t 112867
is_recursive_t 1297366648
is_scalar_t 107673662
is_universal_constant 13041442
is_vec_t 515805
isint1 2928774
isintm1 0
isintzero 174915711
ismpzero 357710
isonstack 1121167448
killblock 680663
leading_term 41889742
leafcopy_avma 30720948
lgcols 14565612
lgpol 417920754
lincombii 9656179
matpascal 195
mkcol 435444
mkcol2 8274320
mkcol2s 0
mkcol3 28815
mkcol3s 0
mkcol4 0
mkcol4s 0
mkcol5 0
mkcolcopy 18368
mkcols 0
mkcomplex 2075531
mkerr 0
mkfrac 30522
mkfraccopy 994716
mkintmod 261685
mkintmodu 2510
mkmat 131811
mkmat2 6188238
mkmat3 2140
mkmat4 0
mkmat5 0
mkmatcopy 3805
mkmoo 2599
mkoo 4313
mkpolmod 47200
mkqfi 112935
mkquad 30
mkrfrac 5
mkrfraccopy 10
mkvec 2027965
mkvec2 7142360
mkvec2copy 116100
mkvec2s 6360
mkvec3 21062789
mkvec3s 351930
mkvec4 2562061
mkvec4s 5
mkvec5 8169297
mkveccopy 23865
mkvecs 5
mkvecsmall 17835807
mkvecsmall2 61261446
mkvecsmall3 25312036
mkvecsmall4 1292910
mkvecsmall5 140
modpr_get_T 514756
modpr_get_p 1655
modpr_get_pr 1118237
mpcosz 0
mpexpz 0
mplogz 0
mpsinz 0
mul_content 148513
mul_denom 120339
mulsubii 937951
nbits2extraprec 160594376
nbits2lg 1695146
nbits2nlong 529588
nbits2prec 53114441
nbrows 8023106
nchar2nlong 5761888
ndec2nlong 8631
ndec2prec 8631
nf_get_G 25572
nf_get_M 611089
nf_get_Tr 560
nf_get_degree 1713660
nf_get_diff 560
nf_get_disc 13470
nf_get_index 304970
nf_get_invzk 672278
nf_get_pol 3615804
nf_get_r1 657156
nf_get_r2 195
nf_get_roots 28114
nf_get_roundG 231076
nf_get_sign 2664
nf_get_varn 2280
nf_get_zk 3796804
normalize_frac 2854063
odd 141136912
pari_calloc 15706
pari_err_BUG 10
pari_err_COMPONENT 145
pari_err_CONSTPOL 5
pari_err_COPRIME 30
pari_err_DIM 141
pari_err_DOMAIN 901
pari_err_FILE 0
pari_err_FLAG 10
pari_err_IMPL 95
pari_err_INV 460
pari_err_IRREDPOL 10
pari_err_MAXPRIME 0
pari_err_MODULUS 505
pari_err_OP 220
pari_err_OVERFLOW 40
pari_err_PACKAGE 0
pari_err_PREC 156
pari_err_PRIME 25
pari_err_PRIORITY 55
pari_err_ROOTS0 25
pari_err_SQRTN 50
pari_err_TYPE 7606
pari_err_TYPE2 1990
pari_err_VAR 350
pari_free 24362731
pari_malloc 74515755
pari_realloc 43851
pari_stack_alloc 154251265
pari_stack_base 154269934
pari_stack_delete 14109
pari_stack_init 17845
pari_stack_new 134785162
pari_stack_pushp 4560
perm_conj 25
perm_inv 70
perm_mul 12658134
pol0_F2x 1224732
pol0_Flx 16692669
pol1_F2x 366731
pol1_Flx 6794291
pol_0 7919770
pol_1 410980
pol_x 209590
polx_F2x 120604
polx_Flx 4177109
polx_zx 0
powIs 575
powii 214002
pr_get_e 809701
pr_get_f 2408660
pr_get_gen 1143630
pr_get_p 3922018
pr_get_tau 1576822
pr_is_inert 335979
pr_norm 39977
prec2nbits 32179623
prec2nbits_mul 34283
prec2ndec 2620
precdbl 1129
qfb_disc 2654415
qfb_disc3 2704625
quad_disc 125
quadnorm 445
remsBIL 2074486164
resultant 18070
rnf_get_absdegree 130
rnf_get_degree 655
rnf_get_disc 100
rnf_get_index 75
rnf_get_invzk 755
rnf_get_map 960
rnf_get_nf 3530
rnf_get_nfdegree 385
rnf_get_nfpol 3310
rnf_get_nfvarn 40
rnf_get_nfzk 525
rnf_get_pol 5055
rnf_get_polabs 1300
rnf_get_varn 0
rnf_get_zk 1375
row 80739
row_Flm 16906
row_i 1395
row_zm 0
rowcopy 15
rowpermute 95084
rowslice 66012
rowslicepermute 13106
ser_isexactzero 432418
shallowcopy 134939
sqrfrac 84717
sqrti 1744458
sqrtnr 20669
sqrtr 4620597
sturm 0
submulii 31237940
submuliu 5000
submuliu_inplace 177546077
truecoeff 0
trunc_safe 0
vec_append 39210
vec_ei 215091
vec_lengthen 5410
vec_setconst 1205
vec_shorten 0
vec_to_vecsmall 143685
vecpermute 2973819
vecreverse 790
vecreverse_inplace 156
vecslice 1150812
vecslicepermute 58132
vecsmall_append 253835
vecsmall_coincidence 0
vecsmall_concat 137420
vecsmall_copy 15085570
vecsmall_ei 5100
vecsmall_indexmax 10
vecsmall_indexmin 10
vecsmall_isin 79410
vecsmall_lengthen 320
vecsmall_lexcmp 1847410
vecsmall_max 1170
vecsmall_min 0
vecsmall_pack 60
vecsmall_prefixcmp 25204425
vecsmall_prepend 530
vecsmall_shorten 3190
vecsmall_to_col 299807
vecsmall_to_vec 3894
vecsmallpermute 12438954
vecsmalltrunc_append 1595889
vecsmalltrunc_init 850440
vecsplice 2565
vectrunc_append 789024
vectrunc_append_batch 0
vectrunc_init 499193
zc_to_ZC 286287
zero_F2m 0
zero_F2m_copy 66144
zero_F2v 524813
zero_F2x 55
zero_Flm 210
zero_Flm_copy 16600
zero_Flv 13239903
zero_Flx 32868
zero_zm 0
zero_zv 9180193
zero_zx 0
zerocol 14007658
zeromat 3850
zeromatcopy 1305405
zeropadic 7700
zeropadic_shallow 225
zeropol 2934793
zeroser 3360
zerovec 3912067
zm_copy 0
zm_to_zxV 0
zm_transpose 65
zv_copy 520603
zv_to_ZV 3045
zv_to_zx 0
zx_renormalize 0
zx_shift 0
zx_to_zv 0

Generated by: LCOV version 1.9