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 16624-25b9976) Lines: 1139 1287 88.5 %
Date: 2014-06-24 Functions: 469 538 87.2 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 490 599 81.8 %

Function Name Sort by function name Hit count Sort by hit count
F2m_clear 0
F2m_coeff 9986316
F2m_copy 1028
F2m_flip 229258
F2m_set 1586412
F2v_clear 1324208
F2v_coeff 57375131
F2v_copy 0
F2v_ei 5
F2v_flip 229258
F2v_set 10351711
F2v_to_F2x 4384
F2x_clear 1324208
F2x_coeff 57627954
F2x_div 730588
F2x_equal 705691
F2x_equal1 1039
F2x_flip 229258
F2x_renormalize 18167132
F2x_set 14894329
Flm_copy 326060
Flv_copy 648355
Flx_copy 23992911
Flx_div 911802
Flx_equal1 1936402
Flx_lead 45430
Flx_mulu 118835
FlxqX_div 3455
FlxqX_rem 35267
Flxq_add 0
Flxq_sub 0
FpV_FpC_mul 0
FpXQX_div 0
FpXQX_renormalize 285782
FpXQ_add 0
FpXQ_sub 0
FpXX_renormalize 143987
FpX_div 423773
FpX_renormalize 54054257
Fp_add 24222866
Fp_addmul 1650502
Fp_center 1984889
Fp_div 1332321
Fp_halve 9781
Fp_inv 3073134
Fp_invsafe 193693
Fp_mul 15946213
Fp_muls 165
Fp_mulu 18031700
Fp_neg 6427815
Fp_red 6522131
Fp_sqr 3717065
Fp_sub 31719158
FqXQ_add 0
FqXQ_div 11160
FqXQ_inv 0
FqXQ_invsafe 0
FqXQ_mul 26190
FqXQ_pow 0
FqXQ_sqr 11365
FqXQ_sub 0
FqX_Fp_mul 312110
FqX_Fq_mul 320848
FqX_add 491680
FqX_div 2303
FqX_divrem 0
FqX_extgcd 21259
FqX_gcd 7248
FqX_mul 31055
FqX_mulu 250038
FqX_neg 2670
FqX_red 2120
FqX_rem 8120
FqX_sqr 1115
FqX_sub 54015
Fq_red 1190321
GENbinbase 37023871
QV_isscalar 4478369
Q_abs 174886
Q_abs_shallow 20561
RgC_fpnorml2 83058
RgC_gtofp 171004
RgC_gtomp 400
RgM_dimensions 81389
RgM_fpnorml2 415
RgM_gtofp 12424
RgM_gtomp 10
RgM_inv 19592
RgM_minor 265
RgM_shallowcopy 3905984
RgV_is_QV 0
RgV_is_ZV 917140
RgV_isscalar 4465
RgXQX_div 0
RgXQX_rem 7440
RgXQ_mul 197489
RgXQ_sqr 97799
RgX_coeff 3575
RgX_copy 40946905
RgX_div 4499166
RgX_equal_var 565572
RgX_fpnorml2 6144
RgX_gtofp 277056
RgX_is_QX 3782
RgX_is_ZX 38610664
RgX_is_monomial 10675578
RgX_is_rational 475
RgX_isscalar 0
RgX_rem 999967
RgX_renormalize 115525
RgX_shift_inplace 358155
RgX_shift_inplace_init 358155
Rg_col_ei 2608821
ZC_hnfrem 606679
ZM_hnfrem 18121
ZM_lll 932242
ZV_dvd 16570
ZV_isscalar 1703596
ZV_to_zv 137726
ZXQ_mul 62115
ZXQ_sqr 9675
ZX_ZXY_resultant 0
ZX_equal1 9113
ZX_renormalize 47612964
Z_ispower 10
Z_issquare 164342
abgrp_get_cyc 798710
abgrp_get_gen 198279
abgrp_get_no 5634
absfrac 809924
absfrac_shallow 5588
addmuliu 5000
addmuliu_inplace 184538140
affc_fixlg 19085
affgr 2292381
bid_get_arch 91221
bid_get_cyc 421203
bid_get_gen 3393
bid_get_gen_nocheck 0
bid_get_grp 425336
bid_get_ideal 65752
bid_get_mod 255031
bid_get_no 0
bin_copy 18514932
bit_accuracy 677576917
bit_accuracy_mul 1540919
bit_prec 17843285
bnf_get_clgp 402466
bnf_get_cyc 207825
bnf_get_fu 4388
bnf_get_fu_nocheck 8097
bnf_get_gen 194101
bnf_get_logfu 318134
bnf_get_nf 788380
bnf_get_no 435
bnf_get_reg 280
bnf_get_tuN 5143
bnf_get_tuU 4048
bnr_get_bid 158155
bnr_get_bnf 317659
bnr_get_clgp 175119
bnr_get_cyc 168942
bnr_get_gen 933
bnr_get_gen_nocheck 45
bnr_get_mod 6211
bnr_get_nf 1370
bnr_get_no 5199
both_odd 31776914
cgetalloc 1966
cgetc 36855
cgiv 19585179
closure_arity 62504529
closure_codestr 54713453
closure_get_code 0
closure_get_data 54711477
closure_get_dbg 2094
closure_get_frame 730
closure_get_oper 54713453
closure_get_text 4621
closure_is_variadic 7785575
col_ei 889586
const_col 11847
const_vec 4702419
const_vecsmall 2650293
constant_term 12427176
cxcompotor 847646
cxnorm 6978645
cxtofp 423170
cyclic_perm 0
dbllog2r 11349426
degpol 883877347
divsBIL 2191615560
ellQp_get_p 175
ellQp_get_prec 60
ellQp_get_zero 240
ellR_get_prec 180
ellR_get_sign 484
ell_get_a1 1396921
ell_get_a2 1006056
ell_get_a3 1408646
ell_get_a4 1444031
ell_get_a6 1736981
ell_get_b2 1426022
ell_get_b4 311227
ell_get_b6 590707
ell_get_b8 491445
ell_get_c4 3351688
ell_get_c6 3608723
ell_get_disc 4568158
ell_get_j 628845
ell_get_type 4952182
ell_is_inf 13659497
ellff_get_a4a6 182680
ellff_get_field 411510
ellinf 277460
ellnf_get_nf 35025
equali1 115265374
equalim1 40594
err_get_compo 55
err_get_num 14189
gabsz 0
gaddgs 1003136
gaddz 32988
gal_get_den 1097
gal_get_e 30
gal_get_gen 625
gal_get_group 565
gal_get_invvdm 1097
gal_get_mod 1087
gal_get_orders 295
gal_get_p 660
gal_get_pol 620
gal_get_roots 1342
gcmpgs 6975
gdiventz 0
gdivsg 73190
gdivz 0
gen_I 117863
gener_Fq_local 278
gequalgs 3990
gerepileall 2481758
gerepilecoeffs 6
gerepilecopy 14188109
gerepilemany 26010
gerepileupto 271290943
gerepileuptoint 579720458
gerepileuptoleaf 130171399
gmaxsg 0
gminsg 0
gmodz 0
gmul2nz 0
gmulgs 1437883
gmulz 16514
gnegz 0
gshiftz 0
gsubgs 259997
gsubz 0
gtodouble 5711841
gtofp 4508165
gtomp 16000
gtos 20066033
gtou 0
gval 1655
icopy_avma 610880067
idealpseudomin 101225
idealpseudomin_nonscalar 194676
idealred 100615
idealred_elt 221
identity_perm 45513
inf_get_sign 8483
is_bigint 84563191
is_const_t 580280952
is_extscalar_t 424974
is_intreal_t 372977
is_matvec_t 212817320
is_noncalc_t 36695073
is_pm1 560427735
is_rational_t 78917
is_recursive_t 1259571103
is_scalar_t 107759983
is_universal_constant 11434344
is_vec_t 552277
isint1 2846943
isintm1 0
isintzero 201652110
ismpzero 372907
isonstack 1000774332
killblock 689091
leading_term 39745351
leafcopy_avma 33181878
lgcols 17830806
lgpol 336087352
lincombii 17524347
matpascal 195
mkcol 477268
mkcol2 7873237
mkcol2s 0
mkcol3 28721
mkcol3s 0
mkcol4 0
mkcol4s 0
mkcol5 0
mkcolcopy 18444
mkcols 0
mkcomplex 2176335
mkerr 0
mkfrac 30159
mkfraccopy 1038697
mkintmod 282768
mkintmodu 2555
mkmat 177570
mkmat2 5941927
mkmat3 2116
mkmat4 0
mkmat5 0
mkmatcopy 3670
mkmoo 2675
mkoo 4374
mkpolmod 45480
mkqfi 112936
mkquad 45
mkrfrac 5
mkrfraccopy 10
mkvec 1153433
mkvec2 9494453
mkvec2copy 113561
mkvec2s 6384
mkvec3 14391146
mkvec3s 351780
mkvec4 2571486
mkvec4s 5
mkvec5 8313030
mkveccopy 23365
mkvecs 5
mkvecsmall 15086286
mkvecsmall2 64973736
mkvecsmall3 20328996
mkvecsmall4 285560
mkvecsmall5 115
mpcosz 0
mpexpz 0
mplogz 0
mpsinz 0
mul_content 140961
mul_denom 112865
mulsubii 1825633
nbits2extraprec 181101963
nbits2lg 1688748
nbits2nlong 531861
nbits2prec 62634647
nbrows 9793279
nchar2nlong 5933587
ndec2nlong 12597
ndec2prec 12597
nf_get_G 26862
nf_get_M 805526
nf_get_Tr 515
nf_get_degree 1979691
nf_get_diff 510
nf_get_disc 12633
nf_get_index 338463
nf_get_invzk 832405
nf_get_pol 4274596
nf_get_r1 867640
nf_get_r2 195
nf_get_roots 29069
nf_get_roundG 268416
nf_get_sign 2535
nf_get_varn 2253
nf_get_zk 4509999
normalize_frac 2902418
odd 161220143
pari_calloc 13754
pari_err_BUG 0
pari_err_COMPONENT 145
pari_err_CONSTPOL 5
pari_err_COPRIME 30
pari_err_DIM 129
pari_err_DOMAIN 849
pari_err_FILE 0
pari_err_FLAG 5
pari_err_IMPL 80
pari_err_INV 465
pari_err_IRREDPOL 10
pari_err_MAXPRIME 0
pari_err_MODULUS 505
pari_err_OP 220
pari_err_OVERFLOW 32
pari_err_PACKAGE 0
pari_err_PREC 162
pari_err_PRIME 25
pari_err_PRIORITY 45
pari_err_ROOTS0 25
pari_err_SQRTN 50
pari_err_TYPE 7221
pari_err_TYPE2 1990
pari_err_VAR 350
pari_free 25820113
pari_malloc 73918619
pari_realloc 45115
pari_stack_alloc 151031026
pari_stack_base 151049032
pari_stack_delete 12411
pari_stack_init 17360
pari_stack_new 132202294
pari_stack_pushp 5590
perm_conj 25
perm_inv 40
perm_mul 12661222
pol0_F2x 1210707
pol0_Flx 13905418
pol1_F2x 332641
pol1_Flx 6695062
pol_0 8396794
pol_1 386232
pol_x 151031
polx_F2x 126829
polx_Flx 2149995
polx_zx 0
powIs 530
powii 249310
pr_get_e 900178
pr_get_f 5801811
pr_get_gen 1368803
pr_get_p 11239039
pr_get_tau 8931387
pr_is_inert 395028
pr_norm 54409
prec2nbits 35398204
prec2nbits_mul 34655
prec2ndec 2783
precdbl 1119
qfb_disc 2490686
qfb_disc3 2540891
quad_disc 130
quadnorm 760
random_bits 6227956
remsBIL 2141263860
resultant 17612
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 80781
row_Flm 17218
row_i 1430
row_zm 0
rowcopy 15
rowpermute 97400
rowslice 67157
rowslicepermute 13943
shallowcopy 141989
sqrfrac 74767
sqrti 1729017
sqrtnr 19645
sqrtr 4055821
sturm 5
submulii 27685648
submuliu 5000
submuliu_inplace 184834860
truecoeff 5
trunc_safe 0
vec_append 39210
vec_ei 212219
vec_lengthen 5274
vec_setconst 1200
vec_shorten 0
vec_to_vecsmall 143740
vecpermute 3183412
vecreverse 760
vecreverse_inplace 156
vecslice 1360889
vecslicepermute 62079
vecsmall_append 252074
vecsmall_coincidence 0
vecsmall_concat 111954
vecsmall_copy 11793804
vecsmall_ei 5046
vecsmall_indexmax 10
vecsmall_indexmin 10
vecsmall_isin 0
vecsmall_lengthen 320
vecsmall_lexcmp 1847406
vecsmall_max 1170
vecsmall_min 0
vecsmall_pack 60
vecsmall_prefixcmp 25006858
vecsmall_prepend 540
vecsmall_shorten 3000
vecsmall_to_col 337458
vecsmall_to_vec 3894
vecsmallpermute 12442017
vecsmalltrunc_append 1865521
vecsmalltrunc_init 980927
vecsplice 2905
vectrunc_append 599871
vectrunc_append_batch 0
vectrunc_init 380571
zc_to_ZC 324523
zero_F2m 0
zero_F2m_copy 66591
zero_F2v 527519
zero_F2x 55
zero_Flm 100
zero_Flm_copy 8275
zero_Flv 9824568
zero_Flx 33748
zero_zm 0
zero_zv 5201646
zero_zx 0
zerocol 16925650
zeromat 3748
zeromatcopy 1572650
zeropadic 7630
zeropadic_shallow 225
zeropol 2914826
zeroser 6680
zerovec 4036779
zm_copy 0
zm_to_zxV 0
zm_transpose 65
zv_copy 506678
zv_to_ZV 3040
zv_to_zx 0
zx_renormalize 0
zx_shift 0
zx_to_zv 0

Generated by: LCOV version 1.9