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 - rootpol.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30556-bb9f5f8fc8) Lines: 1467 1530 95.9 %
Date: 2025-11-25 09:20:50 Functions: 116 119 97.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FFT 56
FFT_i 98
FFTinv 56
QX_complex_roots 293333
RgX_gtofp_bit 6988291
RgX_normalize1 35832
X2XP1 5978884
ZX_Uspensky 1311839
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 14909
ZX_graeffe 5320
ZX_realroots_irred 47708
ZX_rescale2prim 2229845
ZX_sturm 6389
ZX_sturm_i 121805
ZX_sturm_irred 115416
ZX_sturmpart 1127773
ZX_to_ZiX 16276554
ZiX_sqr 98539336
_gen_nored 11086854
_gen_one 14336827
_gen_zero 325271
_intervalcmp 0
_mp_add 24463371
_mp_cmul 34467655
_mp_mul 4336477
_mp_sqr 6244415
_mp_sub 0
_sqrtnr 22385
a_posteriori_errors 534149
abs_update 7931079
abs_update_r 776482
all_roots 533044
append_clone 1605250
bkeval_single_power 5187452
check_ab 1178401
checkbound 2353932
checkvalidpol 266991
clean_roots 533085
cleanroots 231763
cmp_complex_appr 2223699
conformal_basecase 1397594
conformal_mapping 465828
conformal_pol 1397712
dblexp 6513626
dbllog2 300176345
dft 500063
dual_modulus 1007545
eval_rel_pol 13060799
fft 14029244
fft2 7462
findpower 40763125
fix_roots 534143
fix_roots1 396442
fujiwara_bound 2262630
fujiwara_bound_real 1403392
graeffe 49256267
homothetie 1601687
homothetie2n 9904540
homothetie_gauss 36325754
ind_maxlog2 898965
initdft 991816
isexactpol 239753
isexactscalar 931714
isreal 957579
isvalidcoeff 1229503
logmax_modulus 4430141
logmin_modulus 1607148
logmodulus 603267
logpre_modulus 603265
logradius 491747
lower_bound 40763234
mydbllog2i 225017236
mydbllog2r 55941306
mydbllogr 9464473
mygprec 63443214
mygprec_absolute 4309937
mygprec_special 534149
mygprecrc 213621456
mygprecrc_special 2167188
myshiftic 134936239
myshiftrc 35290424
newton_polygon 5474757
optimize_split 491755
parameters 491752
pol_to_gaussint 17490837
polgraeffe 14
polmod_to_embed 84
polrootsbound 27231
polrootsbound_i 27224
polsolve 165190
quicktofp 6947838
realroots 50627
refine_F 500056
refine_H 2449636
root_error 1901777
roots 8018
roots_aux 239781
roots_com 239753
rootsdeg0 42
scalepol 4270151
scalepol2n 0
sol_ok 3378
solve_exact_pol 231145
split_0 492115
split_0_1 466187
split_0_2 466188
split_1 465827
split_2 491753
split_complete 1518377
split_fromU 491755
split_pols 165191
splitcauchy 165196
splitpoleval 5187136
tocomplex 1204411
update_radius 491750
usp 1122989

Generated by: LCOV version 1.16