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-bordeaux.fr machine (x86_64 architecture), and agregate them in the final report:

The target is to exceed 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 - basemath - arith1.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.16.2 lcov report (development 29115-f22e516b23) Lines: 2099 2310 90.9 %
Date: 2024-04-23 08:07:35 Functions: 211 225 93.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_log_Fp 0
Fl_sqrtl 0
Z_ZV_mod 0
Z_nv_mod 0
gcf2 0
nmV_chinese_center_tree 0
nxCV_chinese_center 0
nxCV_chinese_center_tree 0
pnqn 0
rootsof1_Fp 0
sersfcont 0
sqrt_Cipolla 0
sqrt_Cipolla_msqr 0
sqrt_Cipolla_sqr 0
bestappr_frac 7
fibo 7
sfcont2 14
chinese_intpol 21
mod_to_frac 42
serPade 42
contfrac0 49
bestappr_ser 56
err_oo 56
lucas 56
Fp_log_index 63
Fp_log_sieve 63
check_kernel 63
compute_nbgen 63
opt_param 63
znorder 63
Fp_factored_order 70
Zp_order 70
mod_to_rfrac 70
Fp_pow_init 77
bestapprPade 77
bestappr_RgX 77
nxMV_chinese_center 90
nxMV_polint_center_tree 90
get_PHI 98
mpprimorial 105
gcf 112
Fp_log_find_ind 126
Fp_log_find_rel 126
znlog_rec 126
factorial_Fp 158
err_p 161
_Fp_rand 168
err_prec 196
lift_padic 210
znlog 238
contfracpnqn 252
gener_Zp 259
znprimroot 329
Fp_gausssum 334
lift_intmod 420
ZXM_nv_mod_tree 430
nxMV_chinese_center_tree_seq 430
nxMV_polint_center_tree_seq 430
FpV_prod 497
muls_interval 560
ECP_psi 735
_computeG 735
Fp_rootsof1 796
nxMV_polint_center_tree_worker 840
nonsquare_Fp 1472
_psi 1714
odd_prime_divisors 1812
remove2 1812
Z_chinese 2142
chinese1 2345
rootsof1u_Fp 3033
addifsmooth1 3157
Fp_2gener 3192
ZXC_nv_mod_tree 4048
nxCV_polint_center_tree 4614
is_gener_expo 4909
ZV_chinese 5110
chinese 5425
ncV_chinese_center_tree 5457
Fp_2gener_all 5904
Fp_powers 5924
mphilbertoo 7329
get_Fp_field 7870
nonsquare_Fl 7895
ncV_chinese_center 10193
is_gener_Fp 13896
Fp_invmBarrett 15011
Fp_sqrts 19201
Fp_2gener_i 19931
Fl_log_naive_pre 24511
Fl_log_pre 24910
Fp_pows 29327
ZXX_nv_mod_tree 31090
krois 31157
_Fp_s 33797
kroui 34951
_Fp_inv 36647
Fp_log_sieve_worker 40864
pgener_Fp 44135
Fp_pow_table 54096
factorial_Fl 56705
_Fp_one 57564
Fp_log_halfgcd 58726
hilbert 60403
bestappr 66796
Fl_2gener_pre_i 67856
istotient 70000
Fp_order 75380
Fp_sqrt_ii 77478
mulu_interval_step 90219
addifsmooth2 104083
nmV_chinese_center_tree_seq 111805
nmV_polint_center_tree_seq 111805
Fl_log 131789
Fl_log_naive 131789
hilbertii 135331
Fl_lgener_pre_all 140488
krosi 144257
ZV_chinese_center 157961
mulu_interval 158215
nxV_chinese_center_tree 159227
pgener_Zp 168665
Fp_sqrtn 173306
Fl_2gener_pre 174673
ZM_nv_mod_tree 178781
krouodd 179208
Fl_sqrtn 196268
Fl_sqrtn_pre 196268
pgener_Zl 203414
rootsof1_Fl 214772
Fl_sqrtl_i 221397
Fl_sqrtl_pre 221397
Fl_sqrtl_raw 223764
_Fp_equal0 265834
Z_chinese_all 267614
Z_chinese_pre 271318
Fl_powers 295917
to_ZX 299551
Z_factor_listP 350651
pgener_Fp_local 357846
nmV_chinese_center 367662
nmV_polint_center_tree 367662
polint_chinese 367752
nxV_chinese_center 387723
u_odd_prime_divisors 465090
u_remove2 465090
Fl_order 481766
mpfact 504937
Z_chinese_coprime 526134
u_is_gener_expo 532886
pgener_Fl 579482
ZV_allpnqn 609308
_Fp_rmul 609440
istotient_i 621565
nxV_polint_center_tree 633174
init_montdata 694394
_mul_remiibar 776190
Fp_select_red 886237
_Fp_red 927374
gc_chinese 928739
nmV_polint_center_tree_worker 934863
pgener_Fl_local 1054457
_Fp_neg 1123231
ZV_nv_mod_tree 1208380
_Fp_add 1221969
bestappr_real 1236740
ZX_nv_mod_tree 1462788
ncV_polint_center_tree 1464428
_mul_remii 1523943
u_chinese_post 1524031
u_chinese_coprime 1524032
is_gener_Fl 1629773
_mul2_remiibar 2078975
checkp 2080525
bestappr_Q 2152510
chinese1_coprime_Z_aux 2188561
chinese1_coprime_Z 2407819
gen_chinese 2410165
ZV_chinesetree 2424077
ZV_invdivexact 2424081
ZV_sqr 2424086
ZV_producttree 2428295
icopy_lg 2830744
Qsfcont 2831094
gboundcf 2831759
Fp_powu 2868181
Z_chinese_post 2986269
_mul2_remii 3207070
Fp_log 3917805
Fl_2powu 4160128
Fp_sqrt 4540912
Fp_sqrt_i 4597926
Fp_log_use_index 4652455
gome 5582989
Fp_invgen 5804514
_mul_montred 7109232
_Fp_sqr 8134365
_sqr_remiibar 8446594
Fp_easylog 8447234
Fp_rem_mBarrett 9222784
nonsquare1_Fl 11221977
_mul2_montred 11252760
Fl_sqrt_i 11856098
Fl_sqrt 11870820
kronecker 11938864
Fl_2powu_pre 11964234
ZT_sqr 12440834
Fl_powers_pre 12766922
_Fp_mul 14216257
Fl_sqrt_pre 20952562
_sqr_remii 23159698
kroiu 27324009
_Fp_pow 27823902
Fl_sqrt_pre_i 32983948
Fp_pow 35823427
ZV_chinese_tree 39468251
lcmii 54048836
Z_ZV_mod_tree 58128663
_sqr_montred 69097047
kross 96276412
krouu 96414859
Fl_powu_pre 98158354
Fl_powu 146304500
krouu_s 224002981
ome 317703678

Generated by: LCOV version 1.14