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.18.0 lcov report (development 29806-4d001396c7) Lines: 2076 2276 91.2 %
Date: 2024-12-21 09:08:57 Functions: 218 232 94.0 %
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
mod_to_rfrac 112
bestapprPade 119
bestappr_RgX 119
Fp_log_find_ind 126
Fp_log_find_rel 126
bestapprPade0 126
gcf 126
znlog_rec 126
_Fp_rand 147
factorial_Fp 158
err_p 161
err_prec 196
lift_padic 210
znlog 238
gener_Zp 259
contfracpnqn 266
znprimroot 329
Fp_gausssum 334
lift_intmod 420
ZXM_nv_mod_tree 431
nxMV_chinese_center_tree_seq 431
nxMV_polint_center_tree_seq 431
FpV_prod 497
muls_interval 560
Fp_rootsof1 796
ECP_psi 837
_computeG 837
nxMV_polint_center_tree_worker 839
nonsquare_Fp 1472
_psi 1714
odd_prime_divisors 1812
remove2 1812
Z_chinese 2142
addifsmooth1 2163
chinese1 2415
rootsof1u_Fp 3033
Fp_2gener 3192
ZXC_nv_mod_tree 4054
nxCV_polint_center_tree 4619
is_gener_expo 4909
ZV_chinese 5141
ZVV_nv_mod_tree 5457
ncV_chinese_center_tree 5457
chinese 5495
Fp_2gener_all 5914
Fp_powers 5931
get_Fp_field 6967
mphilbertoo 7329
nonsquare_Fl 7935
ncV_chinese_center 10263
is_gener_Fp 13976
Fp_invmBarrett 15115
_Fp_s 19126
Fp_sqrts 19200
Fp_2gener_i 19791
Fl_log_naive_pre 25001
Fl_log_pre 25400
Fp_pows 29435
Fp_log_sieve_worker 30245
_Fp_inv 34435
kroui 35056
krois 39753
Fp_pow_table 43694
pgener_Fp 44226
_Fp_one 47162
factorial_Fl 56621
tr 59731
Fp_log_halfgcd 61438
hilbert 62314
Fl_2gener_pre_i 67842
istotient 70000
Fp_order 73985
Fp_sqrt_ii 77210
addifsmooth2 83825
ZXX_nv_mod_tree 86604
mulu_interval_step 90578
bestappr 104689
nmV_chinese_center_tree_seq 109259
nmV_polint_center_tree_seq 109259
Fl_log 132629
Fl_log_naive 132629
hilbertii 140826
Fl_lgener_pre_all 141222
krosi 143221
ZV_chinese_center 154224
mulu_interval 158931
rt 169813
pgener_Zp 170604
ZM_nv_mod_tree 171370
Fp_sqrtn 173327
ZM_nv_mod_tree_t 176826
Fl_2gener_pre 177395
krouodd 178277
Fl_sqrtn 196857
Fl_sqrtn_pre 196857
pgener_Zl 205360
rootsof1_Fl 215510
nxV_chinese_center_tree 217082
Fl_sqrtl_i 223207
Fl_sqrtl_pre 223207
Fl_sqrtl_raw 225620
_Fp_equal0 261718
Z_chinese_all 267584
Z_chinese_pre 271291
Fl_powers 296036
Z_factor_listP 350651
pgener_Fp_local 358122
nmV_chinese_center 372734
nmV_polint_center_tree 372734
polint_chinese 372824
nxV_chinese_center 415257
u_odd_prime_divisors 463764
u_remove2 463764
Fl_order 482515
mpfact 496575
u_is_gener_expo 531132
Z_chinese_coprime 535112
pgener_Fl 574542
_Fp_rmul 585377
istotient_i 621565
init_montdata 671596
nxV_polint_center_tree 718590
_mul_remiibar 774370
Fp_select_red 866656
ZV_allpnqn 894782
_Fp_red 901624
nmV_polint_center_tree_worker 936621
gc_chinese 957709
pgener_Fl_local 1050472
_Fp_neg 1115040
ZV_nv_mod_tree 1171116
to_ZX 1190183
_Fp_add 1205873
bestappr_real 1244806
ncV_polint_center_tree 1440268
_mul_remii 1512609
u_chinese_coprime 1598524
u_chinese_post 1598543
is_gener_Fl 1627969
_mul2_remiibar 2079460
chinese1_coprime_Z_aux 2191737
bestappr_Q 2244351
checkp 2260999
ZX_nv_mod_tree 2383156
chinese1_coprime_Z 2412971
gen_chinese 2415386
ZV_chinesetree 2493323
ZV_invdivexact 2493329
ZV_sqr 2493331
ZV_producttree 2497543
Z_chinese_post 2998397
Fp_powu 3060647
icopy_lg 3136994
Qsfcont 3137344
gboundcf 3142307
_mul2_remii 3197092
Fp_log 3926349
Fl_2powu 4304115
Fp_log_use_index 4663656
Fp_sqrt 4832546
Fp_sqrt_i 4889290
gome 5599066
Fp_invgen 5920959
_mul_montred 6957168
_Fp_sqr 8134253
_sqr_remiibar 8437776
Fp_easylog 8463513
Fp_rem_mBarrett 9212146
_mul2_montred 11059976
nonsquare1_Fl 11614678
Fl_2powu_pre 11828893
kronecker 11962547
Fl_sqrt_i 12267568
Fl_sqrt 12322564
Fl_powers_pre 12793451
ZT_sqr 12819341
_Fp_mul 14128325
Fl_sqrt_pre 21087094
_sqr_remii 23181869
kroiu 27630085
_Fp_pow 27865939
Fl_sqrt_pre_i 33570394
Fp_pow 36198016
ZV_chinese_tree 39576272
lcmii 54623738
Z_ZV_mod_tree 57198332
_sqr_montred 67888492
kross 97777666
krouu 98586102
Fl_powu 139677633
Fl_powu_pre 150623651
krouu_s 228014062
ome 321335548

Generated by: LCOV version 1.16