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 29365-b9293dac06) Lines: 2071 2271 91.2 %
Date: 2024-05-21 02:48:16 Functions: 214 228 93.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
ECP_psi 735
Fl_2gener_pre 174692
Fl_2gener_pre_i 67856
Fl_2powu 4288542
Fl_2powu_pre 11770880
Fl_lgener_pre_all 140435
Fl_log 131789
Fl_log_Fp 0
Fl_log_naive 131789
Fl_log_naive_pre 24477
Fl_log_pre 24876
Fl_order 481766
Fl_powers 295924
Fl_powers_pre 12772231
Fl_powu 139906902
Fl_powu_pre 97754604
Fl_sqrt 12252766
Fl_sqrt_i 12196917
Fl_sqrt_pre 20924592
Fl_sqrt_pre_i 33334819
Fl_sqrtl 0
Fl_sqrtl_i 221397
Fl_sqrtl_pre 221397
Fl_sqrtl_raw 223753
Fl_sqrtn 196110
Fl_sqrtn_pre 196110
FpV_prod 497
Fp_2gener 3192
Fp_2gener_all 5904
Fp_2gener_i 19931
Fp_easylog 8452089
Fp_factored_order 70
Fp_gausssum 334
Fp_invgen 5706030
Fp_invmBarrett 14994
Fp_log 3920290
Fp_log_find_ind 126
Fp_log_find_rel 126
Fp_log_halfgcd 57839
Fp_log_index 63
Fp_log_sieve 63
Fp_log_sieve_worker 40878
Fp_log_use_index 4657436
Fp_order 75380
Fp_pow 36214227
Fp_pow_init 77
Fp_pow_table 54096
Fp_powers 5931
Fp_pows 29376
Fp_powu 3015605
Fp_rem_mBarrett 9212246
Fp_rootsof1 796
Fp_select_red 903079
Fp_sqrt 4833851
Fp_sqrt_i 4890863
Fp_sqrt_ii 77466
Fp_sqrtn 173306
Fp_sqrts 19198
Qsfcont 2831094
ZM_nv_mod_tree 175308
ZT_sqr 12253851
ZV_allpnqn 609308
ZV_chinese 5110
ZV_chinese_center 152844
ZV_chinese_tree 39287809
ZV_chinesetree 2395867
ZV_invdivexact 2395864
ZV_nv_mod_tree 1195315
ZV_producttree 2400104
ZV_sqr 2395889
ZXC_nv_mod_tree 4071
ZXM_nv_mod_tree 430
ZXX_nv_mod_tree 31169
ZX_nv_mod_tree 1423024
Z_ZV_mod 0
Z_ZV_mod_tree 57935637
Z_chinese 2142
Z_chinese_all 267593
Z_chinese_coprime 513514
Z_chinese_post 2975783
Z_chinese_pre 271297
Z_factor_listP 350651
Z_nv_mod 0
Zp_order 70
_Fp_add 1221892
_Fp_equal0 265835
_Fp_inv 36641
_Fp_mul 14225368
_Fp_neg 1123197
_Fp_one 57564
_Fp_pow 27860702
_Fp_rand 147
_Fp_red 927275
_Fp_rmul 609335
_Fp_s 33795
_Fp_sqr 8134365
_computeG 735
_gc_upto 112
_mul2_montred 11249041
_mul2_remii 3220200
_mul2_remiibar 2079690
_mul_montred 7114527
_mul_remii 1525835
_mul_remiibar 774306
_psi 1714
_sqr_montred 69074598
_sqr_remii 23350871
_sqr_remiibar 8437940
addifsmooth1 3157
addifsmooth2 104083
bestappr 66603
bestapprPade 119
bestapprPade0 126
bestappr_Q 2065655
bestappr_RgX 119
bestappr_frac 7
bestappr_real 1175310
bestappr_ser 98
check_kernel 63
checkp 2232724
chinese 5425
chinese1 2345
chinese1_coprime_Z 2411180
chinese1_coprime_Z_aux 2190716
chinese_intpol 21
compute_nbgen 63
contfrac0 49
contfracpnqn 252
err_oo 56
err_p 161
err_prec 196
factorial_Fl 56692
factorial_Fp 158
fibo 7
gboundcf 2831759
gc_chinese 923911
gc_empty 42
gcf 112
gcf2 0
gen_chinese 2413525
gener_Zp 259
get_Fp_field 7868
get_PHI 98
gome 5585807
hilbert 60445
hilbertii 135373
icopy_lg 2830744
init_montdata 706046
is_gener_Fl 1629874
is_gener_Fp 14048
is_gener_expo 4909
istotient 70000
istotient_i 621565
krois 31157
kroiu 27513263
kronecker 11939914
krosi 144257
kross 96276418
kroui 35096
krouodd 179352
krouu 97415560
krouu_s 225198489
lcmii 53406221
lift_intmod 420
lift_padic 210
lucas 56
mod_to_frac 42
mod_to_rfrac 112
mpfact 491480
mphilbertoo 7329
mpprimorial 105
muls_interval 560
mulu_interval 158453
mulu_interval_step 89545
ncV_chinese_center 10193
ncV_chinese_center_tree 5457
ncV_polint_center_tree 1440392
nmV_chinese_center 365510
nmV_chinese_center_tree 0
nmV_chinese_center_tree_seq 108603
nmV_polint_center_tree 365510
nmV_polint_center_tree_seq 108603
nmV_polint_center_tree_worker 923301
nonsquare1_Fl 11555770
nonsquare_Fl 7907
nonsquare_Fp 1472
nxCV_chinese_center 0
nxCV_chinese_center_tree 0
nxCV_polint_center_tree 4613
nxMV_chinese_center 90
nxMV_chinese_center_tree_seq 430
nxMV_polint_center_tree 90
nxMV_polint_center_tree_seq 430
nxMV_polint_center_tree_worker 840
nxV_chinese_center 390165
nxV_chinese_center_tree 159801
nxV_polint_center_tree 635988
odd_prime_divisors 1812
ome 318487450
opt_param 63
pgener_Fl 579484
pgener_Fl_local 1054351
pgener_Fp 44163
pgener_Fp_local 357915
pgener_Zl 203421
pgener_Zp 168665
pnqn 0
polint_chinese 365600
remove2 1812
rootsof1_Fl 214614
rootsof1_Fp 0
rootsof1u_Fp 3033
serPade 49
sersfcont 0
sfcont2 14
sqrt_Cipolla 0
sqrt_Cipolla_msqr 0
sqrt_Cipolla_sqr 0
to_ZX 300197
u_chinese_coprime 1463252
u_chinese_post 1463265
u_is_gener_expo 532913
u_odd_prime_divisors 464959
u_remove2 464959
znlog 238
znlog_rec 126
znorder 63
znprimroot 329

Generated by: LCOV version 1.14