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 30209-fa4743ed68) Lines: 1467 1530 95.9 %
Date: 2025-04-25 09:18:24 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 15210
_sqrtnr 22644
polrootsbound_i 27034
polrootsbound 27041
RgX_normalize1 35628
ZX_realroots_irred 48307
realroots 50613
ZX_sturm_irred 116279
ZX_sturm_i 120014
polsolve 165653
split_pols 165656
splitcauchy 165665
solve_exact_pol 231040
cleanroots 231644
isexactpol 239634
roots_com 239634
roots_aux 239662
checkvalidpol 266682
QX_complex_roots 289487
_gen_zero 323616
fix_roots1 393857
conformal_mapping 467735
split_1 467736
split_0_1 468056
split_0_2 468056
logradius 493538
split_2 493543
update_radius 493543
optimize_split 493544
parameters 493544
split_fromU 493544
split_0 493866
refine_F 501928
dft 501929
all_roots 529078
clean_roots 529126
fix_roots 530126
a_posteriori_errors 530129
mygprec_special 530130
logpre_modulus 606024
logmodulus 606026
abs_update_r 777863
ZX_sturmpart 876860
ind_maxlog2 901862
check_ab 927474
isexactscalar 931280
usp 936945
isreal 961279
initdft 995473
dual_modulus 1011602
ZX_Uspensky 1059404
fujiwara_bound_real 1149500
tocomplex 1199238
isvalidcoeff 1226651
conformal_basecase 1403311
conformal_pol 1403433
split_complete 1517851
append_clone 1601477
homothetie 1608538
logmin_modulus 1614020
checkbound 1852077
root_error 1896461
ZX_rescale2prim 1935608
fujiwara_bound 2005635
mygprecrc_special 2158977
cmp_complex_appr 2226089
refine_H 2458789
scalepol 4286955
mygprec_absolute 4294068
_mp_mul 4360508
logmax_modulus 4448102
splitpoleval 5195386
bkeval_single_power 5195732
X2XP1 5201275
newton_polygon 5500635
_mp_sqr 6273358
quicktofp 6445072
dblexp 6544441
RgX_gtofp_bit 7017082
abs_update 7999302
mydbllogr 9540150
homothetie2n 9948438
_gen_nored 11124098
eval_rel_pol 13126183
fft 14143085
_gen_one 14370329
ZX_to_ZiX 16453685
pol_to_gaussint 17574229
_mp_add 24575873
_mp_cmul 34602175
myshiftrc 35478300
homothetie_gauss 36476534
findpower 40932826
lower_bound 40933301
graeffe 49473369
mydbllog2r 55919074
mygprec 63635090
ZiX_sqr 98971843
myshiftic 135732711
mygprecrc 214800808
mydbllog2i 224211662
dbllog2 300142338

Generated by: LCOV version 1.16