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.1 lcov report (development 29873-a0b27995a4) Lines: 2076 2276 91.2 %
Date: 2025-01-15 09:09:42 Functions: 218 232 94.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
ECP_psi 837
Fl_2gener_pre 177380
Fl_2gener_pre_i 67676
Fl_2powu 4306609
Fl_2powu_pre 12414601
Fl_lgener_pre_all 141311
Fl_log 132694
Fl_log_Fp 0
Fl_log_naive 132694
Fl_log_naive_pre 25060
Fl_log_pre 25454
Fl_order 482522
Fl_powers 296050
Fl_powers_pre 12784973
Fl_powu 139871715
Fl_powu_pre 151286131
Fl_sqrt 12329987
Fl_sqrt_i 12419733
Fl_sqrt_pre 21202992
Fl_sqrt_pre_i 33693087
Fl_sqrtl 0
Fl_sqrtl_i 223158
Fl_sqrtl_pre 223158
Fl_sqrtl_raw 225569
Fl_sqrtn 196951
Fl_sqrtn_pre 196951
FpV_prod 497
Fp_2gener 3192
Fp_2gener_all 5914
Fp_2gener_i 19821
Fp_easylog 8463383
Fp_factored_order 70
Fp_gausssum 334
Fp_invgen 5904035
Fp_invmBarrett 15116
Fp_log 3926441
Fp_log_find_ind 126
Fp_log_find_rel 126
Fp_log_halfgcd 61123
Fp_log_index 63
Fp_log_sieve 63
Fp_log_sieve_worker 30246
Fp_log_use_index 4664155
Fp_order 73956
Fp_pow 36199787
Fp_pow_init 105
Fp_pow_table 43694
Fp_powers 5931
Fp_pows 29411
Fp_powu 3058749
Fp_rem_mBarrett 9212484
Fp_rootsof1 796
Fp_select_red 863235
Fp_sqrt 4834188
Fp_sqrt_i 4890985
Fp_sqrt_ii 77978
Fp_sqrtn 173341
Fp_sqrts 19547
Qsfcont 3137344
ZM_nv_mod_tree 236127
ZM_nv_mod_tree_t 241584
ZT_sqr 13285429
ZVV_nv_mod_tree 5457
ZV_allpnqn 894782
ZV_chinese 5141
ZV_chinese_center 154465
ZV_chinese_tree 39590220
ZV_chinesetree 2578132
ZV_invdivexact 2578141
ZV_nv_mod_tree 1274148
ZV_producttree 2582322
ZV_sqr 2578141
ZXC_nv_mod_tree 4054
ZXM_nv_mod_tree 431
ZXX_nv_mod_tree 86752
ZX_nv_mod_tree 2387967
Z_ZV_mod 0
Z_ZV_mod_tree 57056431
Z_chinese 2142
Z_chinese_all 267608
Z_chinese_coprime 544800
Z_chinese_post 3008135
Z_chinese_pre 271311
Z_factor_listP 350651
Z_nv_mod 0
Zp_order 70
_Fp_add 1205873
_Fp_equal0 261718
_Fp_inv 34435
_Fp_mul 14128668
_Fp_neg 1115040
_Fp_one 47162
_Fp_pow 27867938
_Fp_rand 147
_Fp_red 901624
_Fp_rmul 585377
_Fp_s 19126
_Fp_sqr 8134253
_computeG 837
_gc_upto 112
_mul2_montred 11037503
_mul2_remii 3181484
_mul2_remiibar 2079633
_mul_montred 6957043
_mul_remii 1509051
_mul_remiibar 774370
_psi 1714
_sqr_montred 67856864
_sqr_remii 23028134
_sqr_remiibar 8438114
addifsmooth1 2163
addifsmooth2 83825
bestappr 104799
bestapprPade 119
bestapprPade0 126
bestappr_Q 2252554
bestappr_RgX 119
bestappr_frac 7
bestappr_real 1250780
bestappr_ser 98
check_kernel 63
checkp 2258123
chinese 5495
chinese1 2415
chinese1_coprime_Z 2413251
chinese1_coprime_Z_aux 2191771
chinese_intpol 21
compute_nbgen 63
contfrac0 49
contfracpnqn 266
err_oo 56
err_p 161
err_prec 196
factorial_Fl 56620
factorial_Fp 158
fibo 7
gboundcf 3142307
gc_chinese 1007035
gc_empty 42
gcf 126
gcf2 0
gen_chinese 2415666
gener_Zp 259
get_Fp_field 6967
get_PHI 98
gome 5606144
hilbert 62314
hilbertii 140826
icopy_lg 3136994
init_montdata 669346
is_gener_Fl 1628013
is_gener_Fp 13741
is_gener_expo 4909
istotient 70000
istotient_i 621565
krois 39753
kroiu 27623443
kronecker 11961535
krosi 143221
kross 97777677
kroui 34826
krouodd 178047
krouu 98698622
krouu_s 228112607
lcmii 53145465
lift_intmod 420
lift_padic 210
lucas 56
mod_to_frac 42
mod_to_rfrac 112
mpfact 496581
mphilbertoo 7329
mpprimorial 105
muls_interval 560
mulu_interval 158927
mulu_interval_step 90672
ncV_chinese_center 10263
ncV_chinese_center_tree 5457
ncV_polint_center_tree 1523790
nmV_chinese_center 419904
nmV_chinese_center_tree 0
nmV_chinese_center_tree_seq 141808
nmV_polint_center_tree 419904
nmV_polint_center_tree_seq 141808
nmV_polint_center_tree_worker 986872
nonsquare1_Fl 11670933
nonsquare_Fl 7935
nonsquare_Fp 1472
nxCV_chinese_center 0
nxCV_chinese_center_tree 0
nxCV_polint_center_tree 4620
nxMV_chinese_center 90
nxMV_chinese_center_tree_seq 431
nxMV_polint_center_tree 90
nxMV_polint_center_tree_seq 431
nxMV_polint_center_tree_worker 840
nxV_chinese_center 417172
nxV_chinese_center_tree 218765
nxV_polint_center_tree 722223
odd_prime_divisors 1812
ome 321271203
opt_param 63
pgener_Fl 574568
pgener_Fl_local 1050613
pgener_Fp 44233
pgener_Fp_local 358139
pgener_Zl 205360
pgener_Zp 170604
pnqn 0
polint_chinese 419994
remove2 1812
rootsof1_Fl 215609
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 1190404
tr 59731
u_chinese_coprime 1588089
u_chinese_post 1588097
u_is_gener_expo 531143
u_odd_prime_divisors 463868
u_remove2 463868
znlog 238
znlog_rec 126
znorder 63
znprimroot 329

Generated by: LCOV version 1.16