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 30253-12fa336c2a) Lines: 2080 2283 91.1 %
Date: 2025-05-01 09:18:33 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 178478
Fl_2gener_pre_i 65765
Fl_2powu 4287898
Fl_2powu_pre 12386805
Fl_lgener_pre_all 142627
Fl_log 132404
Fl_log_Fp 0
Fl_log_naive 132404
Fl_log_naive_pre 26266
Fl_log_pre 26664
Fl_order 542740
Fl_powers 296050
Fl_powers_pre 12800175
Fl_powu 139661690
Fl_powu_pre 151656310
Fl_sqrt 12303602
Fl_sqrt_i 12424468
Fl_sqrt_pre 21124515
Fl_sqrt_pre_i 33620839
Fl_sqrtl 0
Fl_sqrtl_pre 223975
Fl_sqrtl_raw 226816
Fl_sqrtn 232516
Fl_sqrtn_pre 232516
FpV_prod 497
Fp_2gener 3187
Fp_2gener_all 5748
Fp_2gener_i 19392
Fp_easylog 8464670
Fp_factored_order 70
Fp_gausssum 284
Fp_invgen 5909052
Fp_invmBarrett 13825
Fp_log 3926367
Fp_log_find_ind 126
Fp_log_find_rel 126
Fp_log_halfgcd 56425
Fp_log_index 63
Fp_log_sieve 63
Fp_log_sieve_worker 30254
Fp_log_use_index 4664044
Fp_order 132166
Fp_pow 36206457
Fp_pow_init 105
Fp_pow_table 43694
Fp_powers 5931
Fp_pows 1346178
Fp_powu 1749358
Fp_rem_mBarrett 8445801
Fp_rootsof1 760
Fp_select_red 867217
Fp_sqrt 4832617
Fp_sqrt_i 4886418
Fp_sqrt_ii 75180
Fp_sqrtn 173541
Fp_sqrts 18180
Qsfcont 3137344
ZM_nv_mod_tree 236712
ZM_nv_mod_tree_t 242169
ZT_sqr 13441127
ZVV_nv_mod_tree 5457
ZV_allpnqn 894782
ZV_chinese 5141
ZV_chinese_center 157215
ZV_chinese_tree 39679362
ZV_chinesetree 2599712
ZV_invdivexact 2599721
ZV_nv_mod_tree 1273501
ZV_producttree 2603581
ZV_sqr 2599724
ZXC_nv_mod_tree 4456
ZXM_nv_mod_tree 453
ZXX_nv_mod_tree 86823
ZX_nv_mod_tree 2412262
Z_ZV_mod 0
Z_ZV_mod_tree 57146800
Z_chinese 2142
Z_chinese_all 267616
Z_chinese_coprime 544144
Z_chinese_post 3007520
Z_chinese_pre 271333
Z_factor_listP 350651
Z_nv_mod 0
Zp_order 70
_Fp_add 1175565
_Fp_equal0 260724
_Fp_inv 34307
_Fp_mul 14129778
_Fp_neg 1086846
_Fp_one 47162
_Fp_pow 27870696
_Fp_rand 160
_Fp_red 889913
_Fp_rmul 575346
_Fp_s 19075
_Fp_sqr 8134253
_computeG 837
_gc_upto 112
_mul2_montred 9448895
_mul2_remii 3686105
_mul2_remiibar 1835592
_mul_montred 6606956
_mul_remii 1611458
_mul_remiibar 728704
_psi 1714
_sqr_montred 62938817
_sqr_remii 24441668
_sqr_remiibar 7717097
addifsmooth1 2163
addifsmooth2 83825
bestappr 104848
bestapprPade 119
bestapprPade0 126
bestappr_Q 2245485
bestappr_RgX 119
bestappr_frac 7
bestappr_real 1248477
bestappr_ser 98
check_kernel 63
checkp 2297252
chinese 5495
chinese1 2415
chinese1_coprime_Z 2413472
chinese1_coprime_Z_aux 2191779
compute_nbgen 63
contfrac0 49
contfracpnqn 266
err_oo 56
err_p 161
err_prec 196
factorial_Fl 56830
factorial_Fp 382
fibo 7
gboundcf 3142307
gc_chinese 1015398
gc_empty 42
gcf 126
gcf2 0
gen_chinese 2415887
gener_Zp 259
get_Fp_field 6963
get_PHI 98
gome 5608992
hilbert 62314
hilbertii 140826
icopy_lg 3136994
init_montdata 660662
intmod2polmod 21
is_gener_Fl 1628686
is_gener_Fp 13969
is_gener_expo 4909
istotient 70000
istotient_i 621565
krois 40033
kroiu 27619081
kronecker 11958221
krosi 143239
kross 97370955
kroui 35405
krouodd 178644
krouu 98593094
krouu_s 227587965
lcmii 53353698
lift_intmod 420
lift_padic 210
lucas 56
mod_to_frac 42
mod_to_rfrac 112
mpfact 496527
mphilbertoo 7329
mpprimorial 105
muls_interval 623
mulu_interval 159092
mulu_interval_step 90586
ncV_chinese_center 10200
ncV_chinese_center_tree 5457
ncV_polint_center_tree 1525834
nmV_chinese_center 420805
nmV_chinese_center_tree 0
nmV_chinese_center_tree_seq 142024
nmV_polint_center_tree 420805
nmV_polint_center_tree_seq 142024
nmV_polint_center_tree_worker 990172
nonsquare1_Fl 11620824
nonsquare_Fl 7930
nonsquare_Fp 1339
nxCV_chinese_center 0
nxCV_chinese_center_tree 0
nxCV_polint_center_tree 5190
nxMV_chinese_center 97
nxMV_chinese_center_tree_seq 453
nxMV_polint_center_tree 97
nxMV_polint_center_tree_seq 453
nxMV_polint_center_tree_worker 1008
nxV_chinese_center 421940
nxV_chinese_center_tree 220035
nxV_polint_center_tree 741145
odd_prime_divisors 1812
ome 320593718
opt_param 63
padic2mod 21
pgener_Fl 575216
pgener_Fl_local 1051202
pgener_Fp 44247
pgener_Fp_local 358147
pgener_Zl 205717
pgener_Zp 170961
pnqn 0
polint_chinese 420902
remove2 1812
rootsof1_Fl 215530
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 1200352
tr 59731
u_chinese_coprime 1589777
u_chinese_post 1589791
u_is_gener_expo 531381
u_odd_prime_divisors 464102
u_remove2 464102
znlog 238
znlog_rec 126
znorder 63
znprimroot 329

Generated by: LCOV version 1.16