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 30831-19b50a36d0) Lines: 1467 1530 95.9 %
Date: 2026-04-20 09:27:00 Functions: 116 119 97.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FFT 56
FFT_i 98
FFTinv 56
QX_complex_roots 296307
RgX_gtofp_bit 7048715
RgX_normalize1 35705
X2XP1 5990921
ZX_Uspensky 1313939
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15203
ZX_graeffe 5439
ZX_realroots_irred 48571
ZX_rescale2prim 2233938
ZX_sturm 6395
ZX_sturm_i 123060
ZX_sturm_irred 116666
ZX_sturmpart 1128342
ZX_to_ZiX 16490657
ZiX_sqr 99217878
_gen_nored 11200755
_gen_one 14469561
_gen_zero 325991
_intervalcmp 0
_mp_add 24659740
_mp_cmul 34759967
_mp_mul 4374368
_mp_sqr 6298092
_mp_sub 0
_sqrtnr 22596
a_posteriori_errors 537485
abs_update 8021553
abs_update_r 780195
all_roots 536373
append_clone 1616252
bkeval_single_power 5234949
check_ab 1178969
checkbound 2355069
checkvalidpol 267228
clean_roots 536421
cleanroots 231763
cmp_complex_appr 2241652
conformal_basecase 1406541
conformal_mapping 468810
conformal_pol 1406659
dblexp 6563032
dbllog2 303907086
dft 503362
dual_modulus 1014563
eval_rel_pol 13169550
fft 14196422
fft2 7462
findpower 41027064
fix_roots 537482
fix_roots1 398801
fujiwara_bound 2272893
fujiwara_bound_real 1407007
graeffe 49602584
homothetie 1613701
homothetie2n 9979555
homothetie_gauss 36562165
ind_maxlog2 904420
initdft 998321
isexactpol 240117
isexactscalar 934122
isreal 963772
isvalidcoeff 1230557
logmax_modulus 4458783
logmin_modulus 1617764
logmodulus 608276
logpre_modulus 608273
logradius 494961
lower_bound 41027747
mydbllog2i 226759568
mydbllog2r 57618018
mydbllogr 9566208
mygprec 63864703
mygprec_absolute 4344366
mygprec_special 537488
mygprecrc 215563504
mygprecrc_special 2181497
myshiftic 136084190
myshiftrc 35579459
newton_polygon 5521239
optimize_split 494963
parameters 494961
pol_to_gaussint 17628284
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166700
quicktofp 6984373
realroots 50627
refine_F 503360
refine_H 2464717
root_error 1914488
roots 8382
roots_aux 240145
roots_com 240117
rootsdeg0 42
scalepol 4297650
scalepol2n 0
sol_ok 3378
solve_exact_pol 231509
split_0 495335
split_0_1 469177
split_0_2 469177
split_1 468811
split_2 494961
split_complete 1528141
split_fromU 494963
split_pols 166700
splitcauchy 166709
splitpoleval 5235050
tocomplex 1215955
update_radius 494962
usp 1126143

Generated by: LCOV version 1.16