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-03-28 08:06:56 Functions: 211 225 93.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
ECP_psi 735
Fl_2gener_pre 174715
Fl_2gener_pre_i 67856
Fl_2powu 4160112
Fl_2powu_pre 11966636
Fl_lgener_pre_all 140470
Fl_log 131789
Fl_log_Fp 0
Fl_log_naive 131789
Fl_log_naive_pre 24520
Fl_log_pre 24919
Fl_order 481766
Fl_powers 295917
Fl_powers_pre 12779952
Fl_powu 146390774
Fl_powu_pre 98126481
Fl_sqrt 11871843
Fl_sqrt_i 11857141
Fl_sqrt_pre 20960736
Fl_sqrt_pre_i 32994977
Fl_sqrtl 0
Fl_sqrtl_i 221446
Fl_sqrtl_pre 221446
Fl_sqrtl_raw 223814
Fl_sqrtn 196268
Fl_sqrtn_pre 196268
FpV_prod 497
Fp_2gener 3192
Fp_2gener_all 5904
Fp_2gener_i 19931
Fp_easylog 8447242
Fp_factored_order 70
Fp_gausssum 334
Fp_invgen 5804361
Fp_invmBarrett 15011
Fp_log 3917810
Fp_log_find_ind 126
Fp_log_find_rel 126
Fp_log_halfgcd 57623
Fp_log_index 63
Fp_log_sieve 63
Fp_log_sieve_worker 40861
Fp_log_use_index 4652463
Fp_order 75380
Fp_pow 35823392
Fp_pow_init 77
Fp_pow_table 54096
Fp_powers 5924
Fp_pows 29327
Fp_powu 2868175
Fp_rem_mBarrett 9222784
Fp_rootsof1 796
Fp_select_red 886207
Fp_sqrt 4540928
Fp_sqrt_i 4597948
Fp_sqrt_ii 77476
Fp_sqrtn 173306
Fp_sqrts 19199
Qsfcont 2831094
ZM_nv_mod_tree 178782
ZT_sqr 12440716
ZV_allpnqn 609308
ZV_chinese 5110
ZV_chinese_center 157965
ZV_chinese_tree 39475697
ZV_chinesetree 2424074
ZV_invdivexact 2424086
ZV_nv_mod_tree 1208388
ZV_producttree 2428300
ZV_sqr 2424088
ZXC_nv_mod_tree 4048
ZXM_nv_mod_tree 430
ZXX_nv_mod_tree 31090
ZX_nv_mod_tree 1462865
Z_ZV_mod 0
Z_ZV_mod_tree 58126418
Z_chinese 2142
Z_chinese_all 267612
Z_chinese_coprime 526361
Z_chinese_post 2986498
Z_chinese_pre 271315
Z_factor_listP 350651
Z_nv_mod 0
Zp_order 70
_Fp_add 1221902
_Fp_equal0 265821
_Fp_inv 36641
_Fp_mul 14216270
_Fp_neg 1123198
_Fp_one 57564
_Fp_pow 27823916
_Fp_rand 168
_Fp_red 927279
_Fp_rmul 609346
_Fp_s 33795
_Fp_sqr 8134365
_computeG 735
_mul2_montred 11253543
_mul2_remii 3213263
_mul2_remiibar 2078975
_mul_montred 7108763
_mul_remii 1524299
_mul_remiibar 776190
_psi 1714
_sqr_montred 69084151
_sqr_remii 23158099
_sqr_remiibar 8446594
addifsmooth1 3157
addifsmooth2 104083
bestappr 66802
bestapprPade 77
bestappr_Q 2159555
bestappr_RgX 77
bestappr_frac 7
bestappr_real 1242768
bestappr_ser 56
check_kernel 63
checkp 2079099
chinese 5425
chinese1 2345
chinese1_coprime_Z 2407836
chinese1_coprime_Z_aux 2188561
chinese_intpol 21
compute_nbgen 63
contfrac0 49
contfracpnqn 252
err_oo 56
err_p 161
err_prec 196
factorial_Fl 56720
factorial_Fp 158
fibo 7
gboundcf 2831759
gc_chinese 928751
gcf 112
gcf2 0
gen_chinese 2410181
gener_Zp 259
get_Fp_field 7868
get_PHI 98
gome 5582874
hilbert 60403
hilbertii 135331
icopy_lg 2830744
init_montdata 694359
is_gener_Fl 1629743
is_gener_Fp 13890
is_gener_expo 4909
istotient 70000
istotient_i 621565
krois 31157
kroiu 27324386
kronecker 11938806
krosi 144257
kross 96276428
kroui 34945
krouodd 179202
krouu 96439127
krouu_s 224032219
lcmii 54055608
lift_intmod 420
lift_padic 210
lucas 56
mod_to_frac 42
mod_to_rfrac 70
mpfact 504946
mphilbertoo 7329
mpprimorial 105
muls_interval 560
mulu_interval 158209
mulu_interval_step 90288
ncV_chinese_center 10193
ncV_chinese_center_tree 5457
ncV_polint_center_tree 1464433
nmV_chinese_center 367669
nmV_chinese_center_tree 0
nmV_chinese_center_tree_seq 111807
nmV_polint_center_tree 367669
nmV_polint_center_tree_seq 111805
nmV_polint_center_tree_worker 934859
nonsquare1_Fl 11227576
nonsquare_Fl 7895
nonsquare_Fp 1472
nxCV_chinese_center 0
nxCV_chinese_center_tree 0
nxCV_polint_center_tree 4614
nxMV_chinese_center 90
nxMV_chinese_center_tree_seq 430
nxMV_polint_center_tree 90
nxMV_polint_center_tree_seq 430
nxMV_polint_center_tree_worker 840
nxV_chinese_center 387724
nxV_chinese_center_tree 159225
nxV_polint_center_tree 633195
odd_prime_divisors 1812
ome 317790231
opt_param 63
pgener_Fl 579471
pgener_Fl_local 1054442
pgener_Fp 44135
pgener_Fp_local 357852
pgener_Zl 203414
pgener_Zp 168665
pnqn 0
polint_chinese 367759
remove2 1812
rootsof1_Fl 214772
rootsof1_Fp 0
rootsof1u_Fp 3033
serPade 42
sersfcont 0
sfcont2 14
sqrt_Cipolla 0
sqrt_Cipolla_msqr 0
sqrt_Cipolla_sqr 0
to_ZX 299581
u_chinese_coprime 1523895
u_chinese_post 1523903
u_is_gener_expo 532882
u_odd_prime_divisors 465085
u_remove2 465085
znlog 238
znlog_rec 126
znorder 63
znprimroot 329

Generated by: LCOV version 1.14