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 16804-345a01c) Lines: 1142 1291 88.5 %
Date: 2014-09-20 Functions: 469 538 87.2 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 493 604 81.6 %

Function Name Sort by function name Hit count Sort by hit count
F2m_clear 0
F2m_coeff 13878197
F2m_copy 1400
F2m_flip 336004
F2m_set 2200727
F2v_clear 1853038
F2v_coeff 81743517
F2v_copy 0
F2v_ei 7
F2v_flip 336004
F2v_set 14442671
F2v_to_F2x 5705
F2x_clear 1853038
F2x_coeff 82338013
F2x_div 980210
F2x_equal 954206
F2x_equal1 1481
F2x_flip 336004
F2x_renormalize 51708781
F2x_set 32053724
Flm_copy 457386
Flv_copy 884157
Flx_copy 33167716
Flx_div 1215420
Flx_equal1 2705658
Flx_lead 63440
Flx_mulu 166427
FlxqX_div 4837
FlxqX_rem 51194
Flxq_add 0
Flxq_sub 0
FpV_FpC_mul 0
FpXQX_div 0
FpXQX_renormalize 492171
FpXQ_add 0
FpXQ_sub 0
FpXX_renormalize 419256
FpX_div 516107
FpX_renormalize 78917688
Fp_add 36484496
Fp_addmul 2309822
Fp_center 2602490
Fp_div 1903088
Fp_halve 13617
Fp_inv 4382874
Fp_invsafe 316029
Fp_mul 22655051
Fp_muls 231
Fp_mulu 24405981
Fp_neg 9051377
Fp_red 9070455
Fp_sqr 5072229
Fp_sub 46532992
FqXQ_add 0
FqXQ_div 15624
FqXQ_inv 0
FqXQ_invsafe 0
FqXQ_mul 36666
FqXQ_pow 0
FqXQ_sqr 15911
FqXQ_sub 0
FqX_Fp_mul 436614
FqX_Fq_mul 448942
FqX_add 687984
FqX_div 3199
FqX_divrem 0
FqX_extgcd 29757
FqX_gcd 10045
FqX_mul 43491
FqX_mulu 349872
FqX_neg 3738
FqX_red 2968
FqX_rem 11319
FqX_sqr 1519
FqX_sub 75621
Fq_red 1756824
GENbinbase 49645608
QV_isscalar 5250363
Q_abs 234160
Q_abs_shallow 28882
RgC_fpnorml2 116284
RgC_gtofp 239918
RgC_gtomp 560
RgM_dimensions 114168
RgM_fpnorml2 574
RgM_gtofp 17387
RgM_gtomp 14
RgM_inv 27451
RgM_minor 371
RgM_shallowcopy 4628195
RgV_is_QV 0
RgV_is_ZV 1260834
RgV_isscalar 6272
RgXQX_div 0
RgXQX_rem 10584
RgXQ_mul 280290
RgXQ_sqr 137065
RgX_coeff 5411
RgX_copy 56913094
RgX_div 6053245
RgX_equal_var 816942
RgX_fpnorml2 8624
RgX_gtofp 380524
RgX_is_QX 5250
RgX_is_ZX 53554330
RgX_is_monomial 14710582
RgX_is_rational 665
RgX_isscalar 0
RgX_rem 1406426
RgX_renormalize 161735
RgX_shift_inplace 472875
RgX_shift_inplace_init 472875
Rg_col_ei 3102226
ZC_hnfrem 783456
ZM_hnfrem 25725
ZM_lll 1080300
ZV_dvd 23198
ZV_isscalar 1192488
ZV_to_zv 192814
ZXQ_mul 86814
ZXQ_sqr 13496
ZX_ZXY_resultant 0
ZX_equal1 12335
ZX_renormalize 68319737
Z_ispower 14
Z_issquare 230149
abgrp_get_cyc 883732
abgrp_get_gen 225153
abgrp_get_no 7896
absfrac 1089953
absfrac_shallow 7819
addmuliu 7000
addmuliu_inplace 232349495
affc_fixlg 26719
affgr 3203490
bid_get_arch 98249
bid_get_cyc 457744
bid_get_gen 4809
bid_get_gen_nocheck 0
bid_get_grp 463589
bid_get_ideal 73221
bid_get_mod 284087
bid_get_no 0
bin_copy 24826782
bit_accuracy 944689397
bit_accuracy_mul 2105499
bit_prec 20589036
bnf_get_clgp 459385
bnf_get_cyc 239398
bnf_get_fu 6209
bnf_get_fu_nocheck 11270
bnf_get_gen 219245
bnf_get_logfu 340336
bnf_get_nf 894893
bnf_get_no 595
bnf_get_reg 371
bnf_get_tuN 7182
bnf_get_tuU 5670
bnr_get_bid 170042
bnr_get_bnf 341862
bnr_get_clgp 194304
bnr_get_cyc 185554
bnr_get_gen 1386
bnr_get_gen_nocheck 63
bnr_get_mod 8939
bnr_get_nf 2079
bnr_get_no 7301
both_odd 42697252
cgetalloc 2584
cgetc 45797
cgiv 38450582
closure_arity 87753739
closure_codestr 76846800
closure_get_code 0
closure_get_data 76843434
closure_get_dbg 3504
closure_get_frame 1022
closure_get_oper 76846800
closure_get_text 7631
closure_is_variadic 10899826
col_ei 1093789
const_col 15678
const_vec 5419227
const_vecsmall 3070144
constant_term 17398636
cxcompotor 1133449
cxnorm 5301603
cxtofp 565875
cyclic_perm 0
dbllog2r 15001636
degpol 1238789397
divsBIL 2793946167
ellQp_get_p 245
ellQp_get_prec 84
ellQp_get_zero 336
ellR_get_prec 252
ellR_get_sign 667
ell_get_a1 1955978
ell_get_a2 1408753
ell_get_a3 1972393
ell_get_a4 2021918
ell_get_a6 2432048
ell_get_b2 1996422
ell_get_b4 435695
ell_get_b6 826967
ell_get_b8 688023
ell_get_c4 4699076
ell_get_c6 5059044
ell_get_disc 6273757
ell_get_j 880677
ell_get_type 6689532
ell_is_inf 20059731
ellff_get_a4a6 255878
ellff_get_field 576401
ellinf 399689
ellnf_get_nf 49035
equali1 158022057
equalim1 55970
err_get_compo 77
err_get_num 21037
gabsz 0
gaddgs 1448612
gaddz 46636
gal_get_den 1512
gal_get_e 42
gal_get_gen 875
gal_get_group 791
gal_get_invvdm 1512
gal_get_mod 1498
gal_get_orders 413
gal_get_p 924
gal_get_pol 868
gal_get_roots 1855
gcmpgs 9765
gdiventz 0
gdivsg 96190
gdivz 0
gen_I 164912
gener_Fq_local 385
gequalgs 5586
gerepileall 3678130
gerepilecoeffs 8
gerepilecopy 18553875
gerepilemany 36799
gerepileupto 361485216
gerepileuptoint 697309802
gerepileuptoleaf 198053062
gmaxsg 0
gminsg 0
gmodz 0
gmul2nz 0
gmulgs 1992167
gmulz 23346
gnegz 0
gshiftz 0
gsubgs 396348
gsubz 0
gtodouble 5148802
gtofp 6239288
gtomp 22400
gtos 28092160
gtou 0
gval 2317
icopy_avma 752449302
idealpseudomin 140258
idealpseudomin_nonscalar 219720
idealred 139503
idealred_elt 308
identity_perm 63714
inf_get_sign 11344
is_bigint 110638312
is_const_t 543372614
is_extscalar_t 547737
is_intreal_t 500687
is_matvec_t 292069409
is_noncalc_t 49951448
is_pm1 709478228
is_rational_t 108901
is_recursive_t 1753773323
is_scalar_t 148686409
is_universal_constant 15796270
is_vec_t 717829
isint1 3984074
isintm1 0
isintzero 255597784
ismpzero 500589
isonstack 1295308989
killblock 964101
leading_term 57319307
leafcopy_avma 41425477
lgcols 19333657
lgpol 514264351
lincombii 13165790
matpascal 273
mkcol 601502
mkcol2 11573563
mkcol2s 0
mkcol3 40215
mkcol3s 0
mkcol4 0
mkcol4s 0
mkcol5 0
mkcolcopy 25541
mkcols 0
mkcomplex 2908907
mkerr 0
mkfrac 40238
mkfraccopy 1370402
mkintmod 364725
mkintmodu 3535
mkmat 189469
mkmat2 8650103
mkmat3 2968
mkmat4 0
mkmat5 0
mkmatcopy 5117
mkmoo 3584
mkoo 5854
mkpolmod 63896
mkqfi 158109
mkquad 63
mkrfrac 7
mkrfraccopy 14
mkvec 1626882
mkvec2 12541054
mkvec2copy 164028
mkvec2s 8813
mkvec3 19616780
mkvec3s 492492
mkvec4 3600192
mkvec4s 7
mkvec5 11544319
mkveccopy 32718
mkvecs 7
mkvecsmall 21897530
mkvecsmall2 92407153
mkvecsmall3 31543128
mkvecsmall4 405479
mkvecsmall5 161
mpcosz 0
mpexpz 0
mplogz 0
mpsinz 0
mul_content 196432
mul_denom 155651
mulsubii 1273495
nbits2extraprec 231030750
nbits2lg 2366054
nbits2nlong 739201
nbits2prec 68728364
nbrows 11189479
nchar2nlong 8482664
ndec2nlong 15532
ndec2prec 15532
nf_get_G 35475
nf_get_M 854387
nf_get_Tr 784
nf_get_degree 2386165
nf_get_diff 777
nf_get_disc 17479
nf_get_index 416226
nf_get_invzk 1010203
nf_get_pol 5202553
nf_get_r1 918957
nf_get_r2 273
nf_get_roots 38266
nf_get_roundG 321718
nf_get_sign 3584
nf_get_varn 3185
nf_get_zk 5330112
normalize_frac 3932333
odd 156450888
pari_calloc 18681
pari_err_BUG 0
pari_err_COMPONENT 203
pari_err_CONSTPOL 7
pari_err_COPRIME 42
pari_err_DIM 191
pari_err_DOMAIN 1213
pari_err_FILE 0
pari_err_FLAG 7
pari_err_IMPL 112
pari_err_INV 651
pari_err_IRREDPOL 14
pari_err_MAXPRIME 0
pari_err_MODULUS 707
pari_err_OP 308
pari_err_OVERFLOW 56
pari_err_PACKAGE 0
pari_err_PREC 218
pari_err_PRIME 35
pari_err_PRIORITY 63
pari_err_ROOTS0 35
pari_err_SQRTN 70
pari_err_TYPE 10462
pari_err_TYPE2 2786
pari_err_VAR 490
pari_free 32940095
pari_malloc 100224225
pari_realloc 60045
pari_stack_alloc 211604042
pari_stack_base 211627939
pari_stack_delete 16579
pari_stack_init 22693
pari_stack_new 185244042
pari_stack_pushp 7311
perm_conj 35
perm_inv 56
perm_mul 17718561
pol0_F2x 1756204
pol0_Flx 20296348
pol1_F2x 514417
pol1_Flx 8931175
pol_0 11886130
pol_1 578433
pol_x 269527
polx_F2x 173109
polx_Flx 5219317
polx_zx 0
powIs 805
powii 299445
pr_get_e 1120260
pr_get_f 3593308
pr_get_gen 1652127
pr_get_p 5075158
pr_get_tau 2202079
pr_is_inert 469996
pr_norm 66625
prec2nbits 42777635
prec2nbits_mul 49738
prec2ndec 3702
precdbl 1572
qfb_disc 3716216
qfb_disc3 3786503
quad_disc 182
quadnorm 1064
remsBIL 2725353989
resultant 24675
rnf_get_absdegree 182
rnf_get_degree 917
rnf_get_disc 140
rnf_get_index 105
rnf_get_invzk 1057
rnf_get_map 1344
rnf_get_nf 4942
rnf_get_nfdegree 539
rnf_get_nfpol 4634
rnf_get_nfvarn 56
rnf_get_nfzk 735
rnf_get_pol 7077
rnf_get_polabs 1820
rnf_get_varn 0
rnf_get_zk 1925
row 113098
row_Flm 24216
row_i 1960
row_zm 0
rowcopy 21
rowpermute 132702
rowslice 92796
rowslicepermute 18896
ser_isexactzero 631320
shallowcopy 186122
sqrfrac 124292
sqrti 2438113
sqrtnr 27048
sqrtr 4896409
sturm 7
submulii 35206167
submuliu 7000
submuliu_inplace 232625150
truecoeff 7
trunc_safe 0
vec_append 54894
vec_ei 296773
vec_lengthen 7574
vec_setconst 1701
vec_shorten 0
vec_to_vecsmall 201214
vecpermute 4193548
vecreverse 1120
vecreverse_inplace 218
vecslice 1614816
vecslicepermute 82732
vecsmall_append 353612
vecsmall_coincidence 0
vecsmall_concat 192290
vecsmall_copy 21948076
vecsmall_ei 7196
vecsmall_indexmax 14
vecsmall_indexmin 14
vecsmall_isin 0
vecsmall_lengthen 448
vecsmall_lexcmp 2586374
vecsmall_max 1638
vecsmall_min 0
vecsmall_pack 84
vecsmall_prefixcmp 35286195
vecsmall_prepend 749
vecsmall_shorten 4193
vecsmall_to_col 417817
vecsmall_to_vec 5473
vecsmallpermute 17411723
vecsmalltrunc_append 2226120
vecsmalltrunc_init 1186488
vecsplice 4067
vectrunc_append 786148
vectrunc_append_batch 0
vectrunc_init 532702
zc_to_ZC 399323
zero_F2m 0
zero_F2m_copy 92630
zero_F2v 732513
zero_F2x 77
zero_Flm 133
zero_Flm_copy 11676
zero_Flv 17993890
zero_Flx 47269
zero_zm 0
zero_zv 12535253
zero_zx 0
zerocol 19462195
zeromat 5306
zeromatcopy 1806998
zeropadic 10815
zeropadic_shallow 315
zeropol 3977210
zeroser 8260
zerovec 5426497
zm_copy 0
zm_to_zxV 0
zm_transpose 91
zv_copy 716471
zv_to_ZV 4277
zv_to_zx 0
zx_renormalize 0
zx_shift 0
zx_to_zv 0

Generated by: LCOV version 1.9