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: 1468 1530 95.9 %
Date: 2026-03-24 09:26:44 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 296313
RgX_gtofp_bit 7048012
RgX_normalize1 35705
X2XP1 5990808
ZX_Uspensky 1313915
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15204
ZX_graeffe 5439
ZX_realroots_irred 48570
ZX_rescale2prim 2233872
ZX_sturm 6395
ZX_sturm_i 123067
ZX_sturm_irred 116673
ZX_sturmpart 1128325
ZX_to_ZiX 16489919
ZiX_sqr 99235573
_gen_nored 11206998
_gen_one 14473021
_gen_zero 325996
_intervalcmp 0
_mp_add 24663526
_mp_cmul 34777173
_mp_mul 4374673
_mp_sqr 6298570
_mp_sub 0
_sqrtnr 22595
a_posteriori_errors 537473
abs_update 8020856
abs_update_r 780137
all_roots 536369
append_clone 1616167
bkeval_single_power 5235692
check_ab 1178952
checkbound 2355034
checkvalidpol 267214
clean_roots 536415
cleanroots 231763
cmp_complex_appr 2241511
conformal_basecase 1406452
conformal_mapping 468776
conformal_pol 1406571
dblexp 6562481
dbllog2 304069716
dft 503320
dual_modulus 1014477
eval_rel_pol 13168429
fft 14193757
fft2 7462
findpower 41030746
fix_roots 537476
fix_roots1 398793
fujiwara_bound 2272015
fujiwara_bound_real 1406985
graeffe 49607942
homothetie 1613561
homothetie2n 9979008
homothetie_gauss 36564193
ind_maxlog2 904348
initdft 998247
isexactpol 240103
isexactscalar 934017
isreal 963706
isvalidcoeff 1230445
logmax_modulus 4458637
logmin_modulus 1617689
logmodulus 608213
logpre_modulus 608214
logradius 494922
lower_bound 41031110
mydbllog2i 226895870
mydbllog2r 57612238
mydbllogr 9565102
mygprec 63864406
mygprec_absolute 4344212
mygprec_special 537477
mygprecrc 215571073
mygprecrc_special 2181417
myshiftic 136136971
myshiftrc 35577228
newton_polygon 5520710
optimize_split 494929
parameters 494929
pol_to_gaussint 17627031
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166705
quicktofp 6981466
realroots 50627
refine_F 503316
refine_H 2464585
root_error 1914417
roots 8368
roots_aux 240131
roots_com 240103
rootsdeg0 42
scalepol 4297368
scalepol2n 0
sol_ok 3378
solve_exact_pol 231495
split_0 495294
split_0_1 469146
split_0_2 469148
split_1 468777
split_2 494929
split_complete 1528063
split_fromU 494929
split_pols 166704
splitcauchy 166708
splitpoleval 5235971
tocomplex 1215880
update_radius 494926
usp 1126141

Generated by: LCOV version 1.16