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 29465-f396510193) Lines: 2072 2272 91.2 %
Date: 2024-07-25 09:03:53 Functions: 216 230 93.9 %
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
gc_empty 42
mod_to_frac 42
contfrac0 49
serPade 49
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
nxMV_chinese_center 90
nxMV_polint_center_tree 90
bestappr_ser 98
get_PHI 98
Fp_pow_init 105
mpprimorial 105
_gc_upto 112
gcf 112
mod_to_rfrac 112
bestapprPade 119
bestappr_RgX 119
Fp_log_find_ind 126
Fp_log_find_rel 126
bestapprPade0 126
znlog_rec 126
_Fp_rand 147
factorial_Fp 158
err_p 161
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
Fp_rootsof1 796
ECP_psi 837
_computeG 837
nxMV_polint_center_tree_worker 840
nonsquare_Fp 1472
_psi 1714
odd_prime_divisors 1812
remove2 1812
Z_chinese 2142
addifsmooth1 2163
chinese1 2345
rootsof1u_Fp 3033
Fp_2gener 3192
ZXC_nv_mod_tree 4071
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 5931
mphilbertoo 7329
get_Fp_field 7870
nonsquare_Fl 7935
ncV_chinese_center 10263
is_gener_Fp 14052
Fp_invmBarrett 14994
Fp_sqrts 19194
Fp_2gener_i 19931
Fl_log_naive_pre 25026
Fl_log_pre 25425
Fp_pows 29383
Fp_log_sieve_worker 30249
ZXX_nv_mod_tree 31165
_Fp_s 33797
kroui 35098
_Fp_inv 36647
krois 39641
Fp_pow_table 43694
pgener_Fp 44163
_Fp_one 47162
factorial_Fl 56713
tr 59731
Fp_log_halfgcd 60429
hilbert 60445
Fl_2gener_pre_i 67856
istotient 70000
Fp_order 75380
Fp_sqrt_ii 77472
addifsmooth2 83825
mulu_interval_step 89741
bestappr 95275
nmV_chinese_center_tree_seq 108670
nmV_polint_center_tree_seq 108670
Fl_log 131789
Fl_log_naive 131789
hilbertii 135373
Fl_lgener_pre_all 141254
krosi 144537
ZV_chinese_center 152844
mulu_interval 158925
nxV_chinese_center_tree 159801
rt 169813
pgener_Zp 170513
Fp_sqrtn 173306
ZM_nv_mod_tree 175443
Fl_2gener_pre 177360
krouodd 179635
Fl_sqrtn 196110
Fl_sqrtn_pre 196110
pgener_Zl 205269
rootsof1_Fl 214614
Fl_sqrtl_i 223269
Fl_sqrtl_pre 223269
Fl_sqrtl_raw 225625
_Fp_equal0 265848
Z_chinese_all 267598
Z_chinese_pre 271303
Fl_powers 295924
to_ZX 300336
Z_factor_listP 350651
pgener_Fp_local 357905
nmV_chinese_center 365948
nmV_polint_center_tree 365948
polint_chinese 366038
nxV_chinese_center 392759
u_odd_prime_divisors 464984
u_remove2 464984
Fl_order 481773
mpfact 496338
Z_chinese_coprime 513590
u_is_gener_expo 532940
pgener_Fl 581361
_Fp_rmul 609429
istotient_i 621565
nxV_polint_center_tree 638835
init_montdata 697926
_mul_remiibar 774306
Fp_select_red 893641
ZV_allpnqn 894782
nmV_polint_center_tree_worker 923382
gc_chinese 927014
_Fp_red 927370
pgener_Fl_local 1056231
_Fp_neg 1123230
ZV_nv_mod_tree 1164251
bestappr_real 1198186
_Fp_add 1221959
ZX_nv_mod_tree 1423385
ncV_polint_center_tree 1426092
u_chinese_coprime 1508470
u_chinese_post 1508578
_mul_remii 1523073
is_gener_Fl 1630088
_mul2_remiibar 2079690
bestappr_Q 2096153
chinese1_coprime_Z_aux 2191493
checkp 2256812
ZV_chinesetree 2399107
ZV_sqr 2399112
ZV_invdivexact 2399114
ZV_producttree 2403318
chinese1_coprime_Z 2412500
gen_chinese 2414845
Z_chinese_post 2976635
Fp_powu 3017329
icopy_lg 3136994
Qsfcont 3137344
gboundcf 3142293
_mul2_remii 3248270
Fp_log 3925710
Fl_2powu 4289008
Fp_log_use_index 4663475
Fp_sqrt 4833939
Fp_sqrt_i 4890942
gome 5590176
Fp_invgen 5708508
_mul_montred 7069852
_Fp_sqr 8134253
_sqr_remiibar 8437940
Fp_easylog 8458566
Fp_rem_mBarrett 9212246
_mul2_montred 11255786
nonsquare1_Fl 11590093
Fl_2powu_pre 11787758
kronecker 11943592
Fl_sqrt_i 12212273
ZT_sqr 12266338
Fl_sqrt 12268102
Fl_powers_pre 12804656
_Fp_mul 14129111
Fl_sqrt_pre 21071137
_sqr_remii 23279644
kroiu 27525364
_Fp_pow 27875600
Fl_sqrt_pre_i 33497780
Fp_pow 36224901
ZV_chinese_tree 38054112
lcmii 53602144
Z_ZV_mod_tree 54989239
_sqr_montred 69025779
krouu 97682818
kross 97730386
Fl_powu_pre 98071744
Fl_powu 140319309
krouu_s 226940761
ome 320498930

Generated by: LCOV version 1.16