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 30387-12623f1693) Lines: 1467 1530 95.9 %
Date: 2025-07-10 09:22:50 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 3378
ZX_graeffe 5383
ZX_sturm 6395
fft2 7462
roots 8018
ZX_deg1root 15275
_sqrtnr 22710
polrootsbound_i 27293
polrootsbound 27300
RgX_normalize1 35887
ZX_realroots_irred 48624
realroots 50627
ZX_sturm_irred 116762
ZX_sturm_i 123157
split_pols 166625
polsolve 166634
splitcauchy 166643
solve_exact_pol 231040
cleanroots 231644
isexactpol 239634
roots_com 239634
roots_aux 239662
checkvalidpol 266941
QX_complex_roots 290027
_gen_zero 325971
fix_roots1 394090
conformal_mapping 467788
split_1 467790
split_0_1 468112
split_0_2 468112
logradius 493840
split_2 493840
optimize_split 493841
parameters 493841
split_fromU 493841
update_radius 493842
split_0 494164
refine_F 502220
dft 502230
all_roots 529611
clean_roots 529662
fix_roots 530662
a_posteriori_errors 530663
mygprec_special 530668
logpre_modulus 606627
logmodulus 606629
abs_update_r 778456
ind_maxlog2 902421
isexactscalar 931280
isreal 961630
initdft 996071
dual_modulus 1012192
usp 1125948
ZX_sturmpart 1128232
check_ab 1178859
tocomplex 1201046
isvalidcoeff 1229675
ZX_Uspensky 1313842
conformal_basecase 1403486
conformal_pol 1403606
fujiwara_bound_real 1406824
split_complete 1518987
append_clone 1603077
homothetie 1609699
logmin_modulus 1614382
root_error 1899244
mygprecrc_special 2161099
cmp_complex_appr 2231787
ZX_rescale2prim 2233550
fujiwara_bound 2265082
checkbound 2354848
refine_H 2459832
scalepol 4288178
mygprec_absolute 4300504
_mp_mul 4373446
logmax_modulus 4449783
splitpoleval 5223527
bkeval_single_power 5223758
newton_polygon 5506067
X2XP1 5989839
_mp_sqr 6291953
dblexp 6547499
quicktofp 6961053
RgX_gtofp_bit 7023704
abs_update 8003660
mydbllogr 9544783
homothetie2n 9955422
_gen_nored 11177337
eval_rel_pol 13135336
fft 14157412
_gen_one 14443327
ZX_to_ZiX 16451784
pol_to_gaussint 17585153
_mp_add 24650715
_mp_cmul 34730885
myshiftrc 35500259
homothetie_gauss 36489727
lower_bound 40947216
findpower 40947404
graeffe 49495080
mydbllog2r 56779135
mygprec 63702148
ZiX_sqr 99017600
myshiftic 135791392
mygprecrc 215001890
mydbllog2i 226321772
dbllog2 302596779

Generated by: LCOV version 1.16