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

Generated by: LCOV version 1.16