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 16937-4bd9b4e) Lines: 1145 1295 88.4 %
Date: 2014-10-24 Functions: 470 540 87.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 497 608 81.7 %

Function Name Sort by function name Hit count Sort by hit count
F2m_clear 0
F2m_coeff 13873601
F2m_copy 1428
F2m_flip 332566
F2m_set 2200727
F2v_clear 1846574
F2v_coeff 81719411
F2v_copy 0
F2v_ei 7
F2v_flip 332566
F2v_set 14436177
F2v_to_F2x 5964
F2x_clear 1846574
F2x_coeff 82313942
F2x_div 933204
F2x_equal 906212
F2x_equal1 1481
F2x_flip 332566
F2x_renormalize 50591637
F2x_set 31790190
Flm_copy 457394
Flv_copy 890796
Flx_copy 36482790
Flx_div 1223415
Flx_equal1 2902049
Flx_lead 63218
Flx_mulu 199984
FlxqX_div 4837
FlxqX_rem 131097
Flxq_add 0
Flxq_sub 0
FpV_FpC_mul 0
FpXQX_div 0
FpXQX_renormalize 549548
FpXQ_add 0
FpXQ_sub 0
FpXX_renormalize 490833
FpX_div 507400
FpX_renormalize 80688433
Fp_add 39139849
Fp_addmul 2327427
Fp_center 2587088
Fp_div 2308622
Fp_halve 15920
Fp_inv 4666406
Fp_invsafe 323262
Fp_mul 23484733
Fp_muls 231
Fp_mulu 24450706
Fp_neg 9207012
Fp_red 2796426
Fp_sqr 5378256
Fp_sub 51938904
FqXQ_add 0
FqXQ_div 16670
FqXQ_inv 0
FqXQ_invsafe 0
FqXQ_mul 105783
FqXQ_pow 0
FqXQ_sqr 38976
FqXQ_sub 0
FqX_Fp_mul 437534
FqX_Fq_mul 462619
FqX_add 763591
FqX_div 7161
FqX_div_by_X_x 5761
FqX_divrem 0
FqX_extgcd 29449
FqX_gcd 34643
FqX_mul 75691
FqX_mulu 386446
FqX_neg 3972
FqX_powu 973
FqX_red 7665
FqX_rem 25024
FqX_sqr 4039
FqX_sub 102927
Fq_red 1236476
GENbinbase 50250390
QV_isscalar 5194069
Q_abs 231729
Q_abs_shallow 28238
RgC_fpnorml2 116284
RgC_gtofp 242757
RgC_gtomp 560
RgM_dimensions 113524
RgM_fpnorml2 546
RgM_gtofp 17401
RgM_gtomp 14
RgM_inv 27045
RgM_minor 224
RgM_shallowcopy 4580402
RgV_is_QV 0
RgV_is_ZV 1258668
RgV_isscalar 6230
RgXQX_div 0
RgXQX_rem 9842
RgXQ_mul 279572
RgXQ_sqr 137081
RgX_coeff 5411
RgX_copy 56834185
RgX_div 6051765
RgX_equal_var 781144
RgX_fpnorml2 8316
RgX_gtofp 375960
RgX_is_QX 5187
RgX_is_ZX 53472877
RgX_is_monomial 14687558
RgX_is_rational 630
RgX_isscalar 0
RgX_rem 1353257
RgX_renormalize 161497
RgX_shift_inplace 472247
RgX_shift_inplace_init 472247
Rg_col_ei 3086944
ZC_hnfrem 779428
ZM_hnfrem 25074
ZM_lll 1070339
ZV_dvd 23198
ZV_isscalar 1184805
ZV_to_zv 192820
ZXQ_mul 86394
ZXQ_sqr 13034
ZX_ZXY_resultant 0
ZX_equal1 12835
ZX_renormalize 69274213
Z_ispower 14
Z_issquare 230012
abgrp_get_cyc 866849
abgrp_get_gen 221234
abgrp_get_no 7798
absfrac 1078981
absfrac_shallow 7651
addmuliu 7000
addmuliu_inplace 232260272
affc_fixlg 26544
affgr 3172046
bid_get_arch 96699
bid_get_cyc 448062
bid_get_gen 4774
bid_get_gen_nocheck 0
bid_get_grp 453354
bid_get_ideal 69260
bid_get_mod 277232
bid_get_no 0
bin_copy 25129167
bit_accuracy 947015669
bit_accuracy_mul 2103947
bit_prec 20501981
bnf_get_clgp 452667
bnf_get_cyc 236095
bnf_get_fu 6160
bnf_get_fu_nocheck 11144
bnf_get_gen 215879
bnf_get_logfu 333548
bnf_get_nf 881345
bnf_get_no 553
bnf_get_reg 357
bnf_get_tuN 7098
bnf_get_tuU 5593
bnr_get_bid 166795
bnr_get_bnf 335347
bnr_get_clgp 190861
bnr_get_cyc 182174
bnr_get_gen 1379
bnr_get_gen_nocheck 63
bnr_get_mod 8953
bnr_get_nf 2093
bnr_get_no 7245
both_odd 42646677
cgetalloc 2563
cgetc 45636
cgiv 38387928
closure_arity 87790713
closure_codestr 76886497
closure_get_code 0
closure_get_data 76880436
closure_get_dbg 6206
closure_get_frame 1022
closure_get_oper 76886497
closure_get_text 13035
closure_is_variadic 10899812
col_ei 1083367
const_col 15150
const_vec 5388795
const_vecsmall 3048563
constant_term 17399849
cxcompotor 1127695
cxnorm 5281293
cxtofp 562998
cyclic_perm 0
dbllog2r 12760977
degpol 1274629654
divsBIL 2750108527
ellQp_get_p 245
ellQp_get_prec 84
ellQp_get_zero 336
ellR_get_prec 245
ellR_get_sign 569
ell_get_a1 1961089
ell_get_a2 1408124
ell_get_a3 1977861
ell_get_a4 2021471
ell_get_a6 2431769
ell_get_b2 2002351
ell_get_b4 432664
ell_get_b6 823957
ell_get_b8 687932
ell_get_c4 4706951
ell_get_c6 5066877
ell_get_disc 6273225
ell_get_j 897400
ell_get_type 6722230
ell_is_inf 20719191
ellff_get_a4a6 255990
ellff_get_field 593467
ellinf 397854
ellnf_get_nf 49035
equali1 158247820
equalim1 55425
err_get_compo 77
err_get_num 26462
gabsz 0
gaddgs 1380635
gaddz 23318
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 9709
gdiventz 0
gdivsg 96015
gdivz 0
gen_I 164100
gener_Fq_local 385
gequalgs 22435
gerepileall 3796086
gerepilecoeffs 8
gerepilecopy 18629287
gerepilemany 35791
gerepileupto 365977293
gerepileuptoint 873217769
gerepileuptoleaf 201136793
gmaxsg 0
gminsg 0
gmodz 0
gmul2nz 0
gmulgs 2081558
gmulz 11673
gnegz 0
gshiftz 0
gsubgs 376909
gsubz 0
gtodouble 5086641
gtofp 6586607
gtomp 22400
gtos 28091132
gtou 0
gval 413
icopy_avma 763550935
idealpseudomin 139621
idealpseudomin_nonscalar 216181
idealred 138873
idealred_elt 308
identity_perm 63623
inf_get_sign 11184
is_bigint 109325047
is_const_t 541265434
is_extscalar_t 541628
is_intreal_t 500036
is_matvec_t 291125391
is_noncalc_t 49498210
is_pm1 708797949
is_rational_t 108481
is_recursive_t 1787503304
is_scalar_t 148525888
is_universal_constant 18156852
is_vec_t 713448
isint1 3985455
isintm1 0
isintzero 249836713
ismpzero 499959
isonstack 1478730054
killblock 949434
leading_term 58055697
leafcopy_avma 42138941
lgcols 19166814
lgpol 530836938
lincombii 13089330
matpascal 273
mkcol 597999
mkcol2 11576529
mkcol2s 0
mkcol3 40313
mkcol3s 0
mkcol4 0
mkcol4s 0
mkcol5 0
mkcolcopy 25637
mkcols 0
mkcomplex 2897365
mkerr 0
mkfrac 37416
mkfraccopy 1364348
mkintmod 360276
mkintmodu 3514
mkmat 183996
mkmat2 8657322
mkmat3 2996
mkmat4 0
mkmat5 0
mkmatcopy 5103
mkmoo 3409
mkoo 5767
mkpolmod 63147
mkqfi 158109
mkquad 42
mkrfrac 7
mkrfraccopy 14
mkvec 1622345
mkvec2 12555824
mkvec2copy 161279
mkvec2s 8617
mkvec3 19629734
mkvec3s 492492
mkvec4 3606135
mkvec4s 7
mkvec5 11528879
mkveccopy 32795
mkvecs 7
mkvecsmall 22160042
mkvecsmall2 89795695
mkvecsmall3 31559793
mkvecsmall4 405262
mkvecsmall5 182
mpcosz 0
mpexpz 0
mplogz 0
mpsinz 0
mul_content 194390
mul_denom 154806
mulsubii 1274464
nbits2extraprec 207846763
nbits2lg 2359397
nbits2nlong 738207
nbits2prec 66071762
nbrows 11114453
nchar2nlong 8392775
ndec2nlong 12053
ndec2prec 12053
nf_get_G 34764
nf_get_M 838691
nf_get_Tr 791
nf_get_degree 2358470
nf_get_diff 784
nf_get_disc 17192
nf_get_index 410116
nf_get_invzk 989252
nf_get_pol 5130105
nf_get_r1 906162
nf_get_r2 259
nf_get_roots 37487
nf_get_roundG 317778
nf_get_sign 3507
nf_get_varn 3185
nf_get_zk 5272739
normalize_frac 3906335
odd 159036733
pari_calloc 20977
pari_err_BUG 14
pari_err_COMPONENT 203
pari_err_CONSTPOL 7
pari_err_COPRIME 42
pari_err_DIM 191
pari_err_DOMAIN 1220
pari_err_FILE 0
pari_err_FLAG 7
pari_err_IMPL 112
pari_err_INV 644
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 225
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 32977158
pari_malloc 100567111
pari_realloc 58893
pari_stack_alloc 211514034
pari_stack_base 211539234
pari_stack_delete 19055
pari_stack_init 24027
pari_stack_new 185153985
pari_stack_pushp 6145
perm_conj 35
perm_inv 56
perm_mul 17717702
pol0_F2x 1708774
pol0_Flx 20562064
pol1_F2x 510485
pol1_Flx 9288861
pol_0 10494591
pol_1 574506
pol_x 289556
polx_F2x 168303
polx_Flx 5241004
polx_zx 0
powIs 812
powii 294477
pr_get_e 1112961
pr_get_f 3562184
pr_get_gen 1638719
pr_get_p 5029646
pr_get_tau 2189403
pr_is_inert 465449
pr_norm 69403
prec2nbits 40429139
prec2nbits_mul 47683
prec2ndec 3646
precdbl 1744
qfb_disc 3716167
qfb_disc3 3786454
quad_disc 175
quadnorm 623
remsBIL 2680538626
resultant 24507
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 113642
row_Flm 23670
row_i 1953
row_zm 0
rowcopy 21
rowpermute 131071
rowslice 91774
rowslicepermute 18238
ser_isexactzero 607422
shallowcopy 184323
sqrfrac 123235
sqrti 2437168
sqrtnr 26870
sqrtr 6173623
sturm 0
submulii 35198033
submuliu 7000
submuliu_inplace 232554521
truecoeff 0
trunc_safe 0
vec_append 54894
vec_ei 296381
vec_lengthen 7574
vec_setconst 1687
vec_shorten 0
vec_to_vecsmall 200520
vecpermute 4169309
vecreverse 1106
vecreverse_inplace 218
vecslice 1599195
vecslicepermute 81136
vecsmall_append 353430
vecsmall_coincidence 0
vecsmall_concat 192388
vecsmall_copy 20997162
vecsmall_ei 7140
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 742
vecsmall_shorten 4466
vecsmall_to_col 414633
vecsmall_to_vec 5452
vecsmallpermute 17410850
vecsmalltrunc_append 2194841
vecsmalltrunc_init 1173183
vecsplice 3535
vectrunc_append 803726
vectrunc_append_batch 0
vectrunc_init 545729
zc_to_ZC 396083
zero_F2m 0
zero_F2m_copy 92172
zero_F2v 731555
zero_F2x 77
zero_Flm 133
zero_Flm_copy 11536
zero_Flv 17948236
zero_Flx 45022
zero_zm 0
zero_zv 12493763
zero_zx 0
zerocol 19332071
zeromat 5159
zeromatcopy 1790028
zeropadic 10780
zeropadic_shallow 315
zeropol 3970546
zeroser 6132
zerovec 5451105
zm_copy 0
zm_to_zxV 0
zm_transpose 91
zv_copy 725060
zv_to_ZV 4263
zv_to_zx 0
zx_renormalize 0
zx_shift 0
zx_to_zv 0

Generated by: LCOV version 1.9