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 30764-6b81f1f3fa) Lines: 1467 1530 95.9 %
Date: 2026-03-23 09:27:26 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 5439
ZX_sturm 6395
fft2 7462
roots 8368
ZX_deg1root 15203
_sqrtnr 22594
polrootsbound_i 27095
polrootsbound 27102
RgX_normalize1 35703
ZX_realroots_irred 48572
realroots 50627
ZX_sturm_irred 116676
ZX_sturm_i 123071
split_pols 166698
polsolve 166705
splitcauchy 166716
solve_exact_pol 231495
cleanroots 231763
isexactpol 240103
roots_com 240103
roots_aux 240131
checkvalidpol 267212
QX_complex_roots 296304
_gen_zero 326012
fix_roots1 398782
split_1 468782
conformal_mapping 468783
split_0_1 469152
split_0_2 469152
logradius 494926
split_2 494927
parameters 494929
split_fromU 494929
optimize_split 494930
update_radius 494930
split_0 495301
refine_F 503315
dft 503320
all_roots 536362
clean_roots 536409
fix_roots 537462
a_posteriori_errors 537464
mygprec_special 537471
logpre_modulus 608199
logmodulus 608204
abs_update_r 780113
ind_maxlog2 904356
isexactscalar 934017
isreal 963711
initdft 998247
dual_modulus 1014485
usp 1126108
ZX_sturmpart 1128218
check_ab 1178846
tocomplex 1215854
isvalidcoeff 1230439
ZX_Uspensky 1313816
conformal_basecase 1406463
conformal_pol 1406581
fujiwara_bound_real 1406886
split_complete 1528069
homothetie 1613551
append_clone 1616150
logmin_modulus 1617716
root_error 1914401
mygprecrc_special 2181389
ZX_rescale2prim 2233935
cmp_complex_appr 2241441
fujiwara_bound 2271925
checkbound 2354822
refine_H 2464602
scalepol 4297388
mygprec_absolute 4344151
_mp_mul 4374670
logmax_modulus 4458702
bkeval_single_power 5236402
splitpoleval 5236451
newton_polygon 5520587
X2XP1 5990874
_mp_sqr 6298424
dblexp 6562551
quicktofp 6981329
RgX_gtofp_bit 7047875
abs_update 8021201
mydbllogr 9565518
homothetie2n 9978969
_gen_nored 11210367
eval_rel_pol 13168405
fft 14193793
_gen_one 14475926
ZX_to_ZiX 16493294
pol_to_gaussint 17627110
_mp_add 24665184
_mp_cmul 34781456
myshiftrc 35577085
homothetie_gauss 36565775
lower_bound 41031998
findpower 41032128
graeffe 49609840
mydbllog2r 57613429
mygprec 63865234
ZiX_sqr 99236930
myshiftic 136143286
mygprecrc 215576449
mydbllog2i 226907962
dbllog2 304090225

Generated by: LCOV version 1.16