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.1 lcov report (development 28697-a4113027d0) Lines: 2046 2256 90.7 %
Date: 2023-09-28 07:47:45 Functions: 209 223 93.7 %
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
mod_to_frac 42
contfrac0 49
bestappr_ser 56
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
mod_to_rfrac 70
Fp_pow_init 77
bestapprPade 77
bestappr_RgX 77
nxMV_chinese_center 90
nxMV_polint_center_tree 90
get_PHI 98
gcf 112
Fp_log_find_ind 126
Fp_log_find_rel 126
znlog_rec 126
_Fp_rand 140
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 588
ECP_psi 735
_computeG 735
Fp_rootsof1 789
nxMV_polint_center_tree_worker 840
nonsquare_Fp 1466
_psi 1714
odd_prime_divisors 1812
remove2 1812
Z_chinese 2142
chinese1 2345
rootsof1u_Fp 3033
addifsmooth1 3157
Fp_2gener 3192
ZXC_nv_mod_tree 4042
nxCV_polint_center_tree 4614
is_gener_expo 4895
ZV_chinese 5095
chinese 5432
ncV_chinese_center_tree 5530
Fp_2gener_all 5905
Fp_powers 5924
get_Fp_field 7093
mphilbertoo 7343
nonsquare_Fl 7893
ncV_chinese_center 10258
Fp_order 10656
Fp_invmBarrett 12972
is_gener_Fp 13964
Fp_2gener_i 19931
Fp_sqrts 19940
Fl_log_naive_pre 22381
Fl_log_pre 22756
_Fp_s 28726
Fp_pows 29430
ZXX_nv_mod_tree 30904
krois 31542
_Fp_inv 33113
kroui 35024
Fp_log_sieve_worker 40846
pgener_Fp 44134
Fl_lgener_pre_all 51447
Fp_pow_table 54096
factorial_Fl 56723
_Fp_one 57564
Fp_log_halfgcd 58390
nmV_chinese_center_tree_seq 58417
nmV_polint_center_tree_seq 58417
hilbert 60665
Fp_sqrtn 62888
bestappr 65583
Fl_2gener_pre_i 67856
istotient 70000
Fp_sqrt_ii 78755
mulu_interval_step 84171
Fl_sqrtn 85697
Fl_sqrtn_pre 85697
ZM_nv_mod_tree 86315
addifsmooth2 104083
nmV_chinese_center 122024
nmV_polint_center_tree 122024
polint_chinese 122114
Fl_sqrtl_pre 122605
Fl_sqrtl_i 122607
Fl_sqrtl_raw 125086
Fl_log 131737
Fl_log_naive 131737
hilbertii 135628
krosi 144257
mulu_interval 156497
ZV_chinese_center 157994
nxV_chinese_center_tree 158811
pgener_Zp 168539
Fl_2gener_pre 174887
krouodd 179281
pgener_Zl 203288
rootsof1_Fl 214619
_Fp_equal0 222261
Z_chinese_all 267634
Z_chinese_pre 271337
Fl_powers 295917
to_ZX 298251
Z_factor_listP 350651
pgener_Fp_local 357753
nxV_chinese_center 378975
u_odd_prime_divisors 464913
u_remove2 464913
Fl_order 481738
Z_chinese_coprime 511336
_Fp_rmul 513167
mpfact 525397
u_is_gener_expo 532797
pgener_Fl 579383
nmV_polint_center_tree_worker 584370
ZV_allpnqn 609308
istotient_i 621565
nxV_polint_center_tree 624095
gc_chinese 674436
init_montdata 691374
_mul_remiibar 772125
_Fp_red 782379
_Fp_neg 844296
Fp_select_red 880803
_Fp_add 936403
ZV_nv_mod_tree 965300
ncV_polint_center_tree 989985
pgener_Fl_local 1054164
bestappr_real 1213090
_mul2_remiibar 1354881
ZX_nv_mod_tree 1456157
u_chinese_coprime 1514396
u_chinese_post 1514417
_mul_remii 1550170
is_gener_Fl 1629809
checkp 2083924
bestappr_Q 2106511
ZV_chinesetree 2114824
ZV_invdivexact 2114826
ZV_sqr 2114830
ZV_producttree 2119044
chinese1_coprime_Z_aux 2184660
chinese1_coprime_Z 2399183
gen_chinese 2401528
icopy_lg 2830748
Qsfcont 2831102
gboundcf 2831763
Fp_powu 2892152
Z_chinese_post 2967581
_mul2_remii 3223943
Fp_sqrt 3265395
Fp_sqrt_i 3323778
Fp_log 3913330
Fl_2powu 4133737
Fp_log_use_index 4643105
gome 5490448
Fp_invgen 5594818
_mul2_montred 6912775
_sqr_remiibar 6977116
_mul_montred 7195209
Fp_rem_mBarrett 7749241
_Fp_sqr 8134365
Fp_easylog 8437910
Fl_2powu_pre 10751725
nonsquare1_Fl 11106364
ZT_sqr 11192603
Fl_sqrt_i 11505542
Fl_sqrt 11521259
kronecker 11628543
Fl_powers_pre 12799306
_Fp_mul 14208504
Fl_sqrt_pre 20790604
_sqr_remii 23119251
kroiu 27379692
_Fp_pow 27746095
Fl_sqrt_pre_i 32471110
Fp_pow 35768820
ZV_chinese_tree 36048130
lcmii 42813890
Z_ZV_mod_tree 54319719
_sqr_montred 60875158
krouu 93562889
Fl_powu_pre 95940895
kross 96258837
Fl_powu 145344411
krouu_s 220899064
ome 313261171

Generated by: LCOV version 1.14