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 28676-df828f1c94) Lines: 2046 2256 90.7 %
Date: 2023-08-26 07:54:43 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 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 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 4066
nxCV_polint_center_tree 4614
is_gener_expo 4895
ZV_chinese 5095
chinese 5432
ncV_chinese_center_tree 5530
Fp_2gener_all 5906
Fp_powers 5924
get_Fp_field 7093
mphilbertoo 7343
nonsquare_Fl 7893
ncV_chinese_center 10258
Fp_order 10656
Fp_invmBarrett 13161
is_gener_Fp 13902
Fp_2gener_i 19931
Fp_sqrts 19931
Fl_log_naive_pre 22355
Fl_log_pre 22733
_Fp_s 28726
Fp_pows 29416
ZXX_nv_mod_tree 30863
krois 31542
_Fp_inv 33113
kroui 34942
Fp_log_sieve_worker 40806
pgener_Fp 44134
Fl_lgener_pre_all 51332
Fp_pow_table 54096
factorial_Fl 56711
_Fp_one 57564
Fp_log_halfgcd 58410
nmV_chinese_center_tree_seq 58427
nmV_polint_center_tree_seq 58427
hilbert 60707
Fp_sqrtn 62888
bestappr 67133
Fl_2gener_pre_i 67856
istotient 70000
Fp_sqrt_ii 78747
mulu_interval_step 84171
Fl_sqrtn 85751
Fl_sqrtn_pre 85751
ZM_nv_mod_tree 86332
addifsmooth2 104083
nmV_chinese_center 122065
nmV_polint_center_tree 122065
polint_chinese 122155
Fl_sqrtl_i 122415
Fl_sqrtl_pre 122415
Fl_sqrtl_raw 124749
Fl_log 131428
Fl_log_naive 131428
hilbertii 135670
krosi 144257
mulu_interval 156497
nxV_chinese_center_tree 159109
ZV_chinese_center 161539
pgener_Zp 168539
Fl_2gener_pre 174817
krouodd 179199
pgener_Zl 203288
rootsof1_Fl 214678
_Fp_equal0 222261
Z_chinese_all 267628
Z_chinese_pre 271331
Fl_powers 295917
to_ZX 297433
Z_factor_listP 350651
pgener_Fp_local 357752
nxV_chinese_center 383983
u_odd_prime_divisors 464970
u_remove2 464971
Fl_order 481738
_Fp_rmul 513167
Z_chinese_coprime 522631
mpfact 525432
u_is_gener_expo 532795
pgener_Fl 579381
nmV_polint_center_tree_worker 583841
ZV_allpnqn 609308
istotient_i 621565
nxV_polint_center_tree 629407
gc_chinese 683030
_mul_remiibar 772741
_Fp_red 782379
init_montdata 811168
_Fp_neg 844296
_Fp_add 936403
ZV_nv_mod_tree 965662
ncV_polint_center_tree 989537
Fp_select_red 1028640
pgener_Fl_local 1054213
bestappr_real 1244530
_mul2_remiibar 1359619
ZX_nv_mod_tree 1471540
_mul_remii 1570301
is_gener_Fl 1629581
u_chinese_coprime 1800700
u_chinese_post 1800716
checkp 2084672
ZV_chinesetree 2131537
ZV_invdivexact 2131546
ZV_sqr 2131548
ZV_producttree 2135758
chinese1_coprime_Z_aux 2184758
bestappr_Q 2195003
chinese1_coprime_Z 2399378
gen_chinese 2401723
icopy_lg 2830748
Qsfcont 2831102
gboundcf 2831763
Z_chinese_post 2978953
Fp_powu 3043220
_mul2_remii 3217790
Fp_sqrt 3265413
Fp_sqrt_i 3323788
Fp_log 3913027
Fl_2powu 4137609
Fp_log_use_index 4642796
gome 5494549
Fp_invgen 6075071
_mul2_montred 6929946
_sqr_remiibar 6988983
_mul_montred 7326414
Fp_rem_mBarrett 7761724
_Fp_sqr 8134365
Fp_easylog 8439942
Fl_2powu_pre 10761286
nonsquare1_Fl 11108181
ZT_sqr 11272345
Fl_sqrt_i 11505630
Fl_sqrt 11521488
kronecker 11628663
Fl_powers_pre 12788417
_Fp_mul 14205533
Fl_sqrt_pre 20772188
_sqr_remii 23209051
kroiu 27379434
_Fp_pow 27741516
Fl_sqrt_pre_i 32451610
Fp_pow 35909325
ZV_chinese_tree 35998959
lcmii 43632790
Z_ZV_mod_tree 54561764
_sqr_montred 61275636
krouu 93589381
Fl_powu_pre 96204559
kross 96258840
Fl_powu 145164836
krouu_s 220922773
ome 313225578

Generated by: LCOV version 1.14