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.18.0 lcov report (development 29712-7c8a932571) Lines: 2072 2272 91.2 %
Date: 2024-11-15 09:08:45 Functions: 216 230 93.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
ECP_psi 837
Fl_2gener_pre 177342
Fl_2gener_pre_i 67842
Fl_2powu 4305191
Fl_2powu_pre 11835633
Fl_lgener_pre_all 141239
Fl_log 132629
Fl_log_Fp 0
Fl_log_naive 132629
Fl_log_naive_pre 25027
Fl_log_pre 25426
Fl_order 482515
Fl_powers 296029
Fl_powers_pre 12788541
Fl_powu 139753984
Fl_powu_pre 150560268
Fl_sqrt 12324884
Fl_sqrt_i 12269708
Fl_sqrt_pre 21060073
Fl_sqrt_pre_i 33547333
Fl_sqrtl 0
Fl_sqrtl_i 223205
Fl_sqrtl_pre 223205
Fl_sqrtl_raw 225617
Fl_sqrtn 196858
Fl_sqrtn_pre 196858
FpV_prod 497
Fp_2gener 3192
Fp_2gener_all 5910
Fp_2gener_i 19931
Fp_easylog 8463150
Fp_factored_order 70
Fp_gausssum 334
Fp_invgen 5921758
Fp_invmBarrett 14991
Fp_log 3925738
Fp_log_find_ind 126
Fp_log_find_rel 126
Fp_log_halfgcd 60476
Fp_log_index 63
Fp_log_sieve 63
Fp_log_sieve_worker 30234
Fp_log_use_index 4663067
Fp_order 75413
Fp_pow 36207988
Fp_pow_init 105
Fp_pow_table 43694
Fp_powers 5931
Fp_pows 29435
Fp_powu 3059820
Fp_rem_mBarrett 9211658
Fp_rootsof1 796
Fp_select_red 865450
Fp_sqrt 4835338
Fp_sqrt_i 4892356
Fp_sqrt_ii 77487
Fp_sqrtn 173327
Fp_sqrts 19200
Qsfcont 3137344
ZM_nv_mod_tree 176828
ZT_sqr 12819416
ZV_allpnqn 894782
ZV_chinese 5141
ZV_chinese_center 154224
ZV_chinese_tree 39574124
ZV_chinesetree 2493321
ZV_invdivexact 2493321
ZV_nv_mod_tree 1171121
ZV_producttree 2497531
ZV_sqr 2493320
ZXC_nv_mod_tree 4048
ZXM_nv_mod_tree 430
ZXX_nv_mod_tree 86571
ZX_nv_mod_tree 2382775
Z_ZV_mod 0
Z_ZV_mod_tree 57216030
Z_chinese 2142
Z_chinese_all 267588
Z_chinese_coprime 535041
Z_chinese_post 2998323
Z_chinese_pre 271292
Z_factor_listP 350651
Z_nv_mod 0
Zp_order 70
_Fp_add 1205873
_Fp_equal0 261718
_Fp_inv 34435
_Fp_mul 14128250
_Fp_neg 1115040
_Fp_one 47162
_Fp_pow 27877136
_Fp_rand 147
_Fp_red 901624
_Fp_rmul 585377
_Fp_s 32894
_Fp_sqr 8134253
_computeG 837
_gc_upto 112
_mul2_montred 11062748
_mul2_remii 3194893
_mul2_remiibar 2079460
_mul_montred 6957579
_mul_remii 1508110
_mul_remiibar 774306
_psi 1714
_sqr_montred 67916769
_sqr_remii 23021385
_sqr_remiibar 8437352
addifsmooth1 2163
addifsmooth2 83825
bestappr 104686
bestapprPade 119
bestapprPade0 126
bestappr_Q 2250426
bestappr_RgX 119
bestappr_frac 7
bestappr_real 1250270
bestappr_ser 98
check_kernel 63
checkp 2254004
chinese 5495
chinese1 2415
chinese1_coprime_Z 2412951
chinese1_coprime_Z_aux 2191737
chinese_intpol 21
compute_nbgen 63
contfrac0 49
contfracpnqn 252
err_oo 56
err_p 161
err_prec 196
factorial_Fl 56644
factorial_Fp 158
fibo 7
gboundcf 3142293
gc_chinese 957724
gc_empty 42
gcf 112
gcf2 0
gen_chinese 2415366
gener_Zp 259
get_Fp_field 6967
get_PHI 98
gome 5601851
hilbert 62314
hilbertii 140826
icopy_lg 3136994
init_montdata 670670
is_gener_Fl 1627969
is_gener_Fp 13948
is_gener_expo 4909
istotient 70000
istotient_i 621565
krois 39641
kroiu 27631238
kronecker 11969945
krosi 143221
kross 97730385
kroui 35006
krouodd 178227
krouu 98571771
krouu_s 227960714
lcmii 54609023
lift_intmod 420
lift_padic 210
lucas 56
mod_to_frac 42
mod_to_rfrac 112
mpfact 496552
mphilbertoo 7329
mpprimorial 105
muls_interval 560
mulu_interval 158933
mulu_interval_step 90656
ncV_chinese_center 10263
ncV_chinese_center_tree 5457
ncV_polint_center_tree 1440342
nmV_chinese_center 372756
nmV_chinese_center_tree 0
nmV_chinese_center_tree_seq 109262
nmV_polint_center_tree 372756
nmV_polint_center_tree_seq 109262
nmV_polint_center_tree_worker 936675
nonsquare1_Fl 11615432
nonsquare_Fl 7935
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 415249
nxV_chinese_center_tree 217055
nxV_polint_center_tree 718583
odd_prime_divisors 1812
ome 321210857
opt_param 63
pgener_Fl 574517
pgener_Fl_local 1050446
pgener_Fp 44226
pgener_Fp_local 358126
pgener_Zl 205339
pgener_Zp 170583
pnqn 0
polint_chinese 372846
remove2 1812
rootsof1_Fl 215508
rootsof1_Fp 0
rootsof1u_Fp 3033
rt 169813
serPade 49
sersfcont 0
sfcont2 14
sqrt_Cipolla 0
sqrt_Cipolla_msqr 0
sqrt_Cipolla_sqr 0
to_ZX 1189897
tr 59731
u_chinese_coprime 1598965
u_chinese_post 1598961
u_is_gener_expo 531123
u_odd_prime_divisors 463759
u_remove2 463759
znlog 238
znlog_rec 126
znorder 63
znprimroot 329

Generated by: LCOV version 1.16