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 30759-17b423fb9b) Lines: 1467 1530 95.9 %
Date: 2026-03-21 09:26:11 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 22595
polrootsbound_i 27097
polrootsbound 27104
RgX_normalize1 35705
ZX_realroots_irred 48571
realroots 50627
ZX_sturm_irred 116674
ZX_sturm_i 123069
split_pols 166702
polsolve 166705
splitcauchy 166710
solve_exact_pol 231495
cleanroots 231763
isexactpol 240103
roots_com 240103
roots_aux 240131
checkvalidpol 267214
QX_complex_roots 296309
_gen_zero 326011
fix_roots1 398792
split_1 468778
conformal_mapping 468779
split_0_1 469148
split_0_2 469148
split_2 494928
update_radius 494928
parameters 494929
logradius 494930
optimize_split 494932
split_fromU 494932
split_0 495299
dft 503325
refine_F 503326
all_roots 536367
clean_roots 536412
a_posteriori_errors 537474
fix_roots 537474
mygprec_special 537477
logmodulus 608230
logpre_modulus 608230
abs_update_r 780149
ind_maxlog2 904367
isexactscalar 934017
isreal 963709
initdft 998256
dual_modulus 1014500
usp 1126088
ZX_sturmpart 1128273
check_ab 1178888
tocomplex 1215880
isvalidcoeff 1230445
ZX_Uspensky 1313870
conformal_basecase 1406446
conformal_pol 1406567
fujiwara_bound_real 1406940
split_complete 1528067
homothetie 1613590
append_clone 1616174
logmin_modulus 1617665
root_error 1914443
mygprecrc_special 2181434
ZX_rescale2prim 2233832
cmp_complex_appr 2241531
fujiwara_bound 2271982
checkbound 2354934
refine_H 2464602
scalepol 4297370
mygprec_absolute 4344191
_mp_mul 4374682
logmax_modulus 4458554
bkeval_single_power 5236038
splitpoleval 5236387
newton_polygon 5520845
X2XP1 5990543
_mp_sqr 6298597
dblexp 6562613
quicktofp 6981359
RgX_gtofp_bit 7048154
abs_update 8021374
mydbllogr 9565769
homothetie2n 9979058
_gen_nored 11208441
eval_rel_pol 13168555
fft 14194736
_gen_one 14474680
ZX_to_ZiX 16488872
pol_to_gaussint 17627191
_mp_add 24665919
_mp_cmul 34780157
myshiftrc 35576828
homothetie_gauss 36561997
lower_bound 41029083
findpower 41029203
graeffe 49605924
mydbllog2r 57610338
mygprec 63864158
ZiX_sqr 99222450
myshiftic 136133594
mygprecrc 215564983
mydbllog2i 226878358
dbllog2 304060247

Generated by: LCOV version 1.16