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 30111-a34de28cf8) Lines: 1467 1530 95.9 %
Date: 2025-04-02 09:20:49 Functions: 116 119 97.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_intervalcmp 0
_mp_sub 0
scalepol2n 0
ZX_Uspensky_equal_yes 14
polgraeffe 14
ZX_Uspensky_no 21
ZX_Uspensky_equal 28
rootsdeg0 42
FFT 56
FFTinv 56
polmod_to_embed 84
FFT_i 98
sol_ok 3350
ZX_sturm 3735
ZX_graeffe 5383
fft2 7462
roots 8018
ZX_deg1root 15212
_sqrtnr 22647
polrootsbound_i 27034
polrootsbound 27040
RgX_normalize1 35628
ZX_realroots_irred 48308
realroots 50613
ZX_sturm_irred 116277
ZX_sturm_i 120012
polsolve 165650
split_pols 165660
splitcauchy 165667
solve_exact_pol 231040
cleanroots 231644
isexactpol 239634
roots_com 239634
roots_aux 239662
checkvalidpol 266682
QX_complex_roots 289495
_gen_zero 323607
fix_roots1 393860
conformal_mapping 467736
split_1 467739
split_0_1 468061
split_0_2 468061
split_2 493543
logradius 493545
optimize_split 493547
split_fromU 493547
parameters 493548
update_radius 493548
split_0 493871
refine_F 501932
dft 501938
all_roots 529082
clean_roots 529128
fix_roots 530129
a_posteriori_errors 530131
mygprec_special 530134
logmodulus 606042
logpre_modulus 606044
abs_update_r 777868
ZX_sturmpart 876868
ind_maxlog2 901847
check_ab 927481
isexactscalar 931280
usp 936936
isreal 961286
initdft 995483
dual_modulus 1011595
ZX_Uspensky 1059409
fujiwara_bound_real 1149501
tocomplex 1199255
isvalidcoeff 1226651
conformal_basecase 1403324
conformal_pol 1403442
split_complete 1517868
append_clone 1601509
homothetie 1608547
logmin_modulus 1614023
checkbound 1852092
root_error 1896476
ZX_rescale2prim 1935644
fujiwara_bound 2005640
mygprecrc_special 2159010
cmp_complex_appr 2226099
refine_H 2458827
scalepol 4286966
mygprec_absolute 4294161
_mp_mul 4360547
logmax_modulus 4448179
splitpoleval 5195105
bkeval_single_power 5195401
X2XP1 5201439
newton_polygon 5500816
_mp_sqr 6273408
quicktofp 6445113
dblexp 6544561
RgX_gtofp_bit 7017319
abs_update 7999088
mydbllogr 9539709
homothetie2n 9948658
_gen_nored 11120694
eval_rel_pol 13126373
fft 14143299
_gen_one 14370136
ZX_to_ZiX 16453323
pol_to_gaussint 17574544
_mp_add 24575648
_mp_cmul 34597937
myshiftrc 35479285
homothetie_gauss 36479875
lower_bound 40933146
findpower 40934038
graeffe 49475897
mydbllog2r 55920164
mygprec 63634939
ZiX_sqr 98973629
myshiftic 135737244
mygprecrc 214807182
mydbllog2i 224241879
dbllog2 300173438

Generated by: LCOV version 1.16