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 29420-55f63b8cfe) Lines: 2072 2272 91.2 %
Date: 2024-07-03 09:03:24 Functions: 216 230 93.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
ECP_psi 837
Fl_2gener_pre 177386
Fl_2gener_pre_i 67856
Fl_2powu 4289535
Fl_2powu_pre 11788365
Fl_lgener_pre_all 141206
Fl_log 131786
Fl_log_Fp 0
Fl_log_naive 131787
Fl_log_naive_pre 25020
Fl_log_pre 25419
Fl_order 481766
Fl_powers 295924
Fl_powers_pre 12800154
Fl_powu 140255642
Fl_powu_pre 97888448
Fl_sqrt 12268481
Fl_sqrt_i 12212606
Fl_sqrt_pre 21041825
Fl_sqrt_pre_i 33472570
Fl_sqrtl 0
Fl_sqrtl_i 223128
Fl_sqrtl_pre 223128
Fl_sqrtl_raw 225483
Fl_sqrtn 196111
Fl_sqrtn_pre 196111
FpV_prod 497
Fp_2gener 3192
Fp_2gener_all 5904
Fp_2gener_i 19931
Fp_easylog 8458539
Fp_factored_order 70
Fp_gausssum 334
Fp_invgen 5708546
Fp_invmBarrett 14994
Fp_log 3925668
Fp_log_find_ind 126
Fp_log_find_rel 126
Fp_log_halfgcd 61009
Fp_log_index 63
Fp_log_sieve 63
Fp_log_sieve_worker 30257
Fp_log_use_index 4663435
Fp_order 75380
Fp_pow 36224576
Fp_pow_init 105
Fp_pow_table 43694
Fp_powers 5931
Fp_pows 29383
Fp_powu 3017317
Fp_rem_mBarrett 9212246
Fp_rootsof1 796
Fp_select_red 893645
Fp_sqrt 4833894
Fp_sqrt_i 4890908
Fp_sqrt_ii 77466
Fp_sqrtn 173306
Fp_sqrts 19195
Qsfcont 3137344
ZM_nv_mod_tree 175315
ZT_sqr 12266263
ZV_allpnqn 894782
ZV_chinese 5110
ZV_chinese_center 152846
ZV_chinese_tree 39321205
ZV_chinesetree 2398702
ZV_invdivexact 2398712
ZV_nv_mod_tree 1195391
ZV_producttree 2402919
ZV_sqr 2398707
ZXC_nv_mod_tree 4070
ZXM_nv_mod_tree 430
ZXX_nv_mod_tree 31167
ZX_nv_mod_tree 1423370
Z_ZV_mod 0
Z_ZV_mod_tree 57942080
Z_chinese 2142
Z_chinese_all 267597
Z_chinese_coprime 513522
Z_chinese_post 2976581
Z_chinese_pre 271300
Z_factor_listP 350651
Z_nv_mod 0
Zp_order 70
_Fp_add 1221892
_Fp_equal0 265835
_Fp_inv 36641
_Fp_mul 14129098
_Fp_neg 1123197
_Fp_one 47162
_Fp_pow 27875471
_Fp_rand 147
_Fp_red 927275
_Fp_rmul 609335
_Fp_s 33795
_Fp_sqr 8134253
_computeG 837
_gc_upto 112
_mul2_montred 11252454
_mul2_remii 3204671
_mul2_remiibar 2079690
_mul_montred 7070163
_mul_remii 1512511
_mul_remiibar 774306
_psi 1714
_sqr_montred 69006262
_sqr_remii 23128288
_sqr_remiibar 8437940
addifsmooth1 2163
addifsmooth2 83825
bestappr 95273
bestapprPade 119
bestapprPade0 126
bestappr_Q 2093380
bestappr_RgX 119
bestappr_frac 7
bestappr_real 1195777
bestappr_ser 98
check_kernel 63
checkp 2245865
chinese 5425
chinese1 2345
chinese1_coprime_Z 2412459
chinese1_coprime_Z_aux 2191493
chinese_intpol 21
compute_nbgen 63
contfrac0 49
contfracpnqn 252
err_oo 56
err_p 161
err_prec 196
factorial_Fl 56721
factorial_Fp 158
fibo 7
gboundcf 3142293
gc_chinese 926667
gc_empty 42
gcf 112
gcf2 0
gen_chinese 2414804
gener_Zp 259
get_Fp_field 7868
get_PHI 98
gome 5590071
hilbert 60445
hilbertii 135373
icopy_lg 3136994
init_montdata 697913
is_gener_Fl 1629846
is_gener_Fp 14067
is_gener_expo 4909
istotient 70000
istotient_i 621565
krois 39641
kroiu 27524486
kronecker 11943594
krosi 144537
kross 97730381
kroui 35113
krouodd 179650
krouu 97630521
krouu_s 226886958
lcmii 53600079
lift_intmod 420
lift_padic 210
lucas 56
mod_to_frac 42
mod_to_rfrac 112
mpfact 496344
mphilbertoo 7329
mpprimorial 105
muls_interval 560
mulu_interval 158931
mulu_interval_step 89742
ncV_chinese_center 10263
ncV_chinese_center_tree 5457
ncV_polint_center_tree 1441361
nmV_chinese_center 365608
nmV_chinese_center_tree 0
nmV_chinese_center_tree_seq 108605
nmV_polint_center_tree 365608
nmV_polint_center_tree_seq 108604
nmV_polint_center_tree_worker 924198
nonsquare1_Fl 11585664
nonsquare_Fl 7935
nonsquare_Fp 1472
nxCV_chinese_center 0
nxCV_chinese_center_tree 0
nxCV_polint_center_tree 4614
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 392750
nxV_chinese_center_tree 159802
nxV_polint_center_tree 638840
odd_prime_divisors 1812
ome 320265116
opt_param 63
pgener_Fl 581306
pgener_Fl_local 1056183
pgener_Fp 44163
pgener_Fp_local 357915
pgener_Zl 205262
pgener_Zp 170506
pnqn 0
polint_chinese 365698
remove2 1812
rootsof1_Fl 214615
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 300296
tr 59731
u_chinese_coprime 1508577
u_chinese_post 1508578
u_is_gener_expo 532899
u_odd_prime_divisors 464943
u_remove2 464943
znlog 238
znlog_rec 126
znorder 63
znprimroot 329

Generated by: LCOV version 1.16