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 30773-2078653b96) Lines: 1467 1530 95.9 %
Date: 2026-04-04 09:27:12 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 15202
_sqrtnr 22595
polrootsbound_i 27097
polrootsbound 27104
RgX_normalize1 35705
ZX_realroots_irred 48570
realroots 50627
ZX_sturm_irred 116672
ZX_sturm_i 123067
polsolve 166692
split_pols 166704
splitcauchy 166712
solve_exact_pol 231495
cleanroots 231763
isexactpol 240103
roots_com 240103
roots_aux 240131
checkvalidpol 267214
QX_complex_roots 296308
_gen_zero 325973
fix_roots1 398790
conformal_mapping 468786
split_1 468786
split_0_1 469156
split_0_2 469158
logradius 494930
split_2 494931
update_radius 494933
optimize_split 494935
parameters 494935
split_fromU 494935
split_0 495301
refine_F 503321
dft 503327
all_roots 536367
clean_roots 536416
a_posteriori_errors 537470
fix_roots 537471
mygprec_special 537474
logmodulus 608214
logpre_modulus 608217
abs_update_r 780123
ind_maxlog2 904357
isexactscalar 934017
isreal 963721
initdft 998261
dual_modulus 1014480
usp 1126086
ZX_sturmpart 1128307
check_ab 1178934
tocomplex 1215879
isvalidcoeff 1230445
ZX_Uspensky 1313905
conformal_basecase 1406472
conformal_pol 1406594
fujiwara_bound_real 1406980
split_complete 1528071
homothetie 1613565
append_clone 1616158
logmin_modulus 1617716
root_error 1914417
mygprecrc_special 2181402
ZX_rescale2prim 2233746
cmp_complex_appr 2241444
fujiwara_bound 2272007
checkbound 2354998
refine_H 2464583
scalepol 4297402
mygprec_absolute 4344222
_mp_mul 4374430
logmax_modulus 4458699
bkeval_single_power 5235076
splitpoleval 5235134
newton_polygon 5520732
X2XP1 5990494
_mp_sqr 6298324
dblexp 6562501
quicktofp 6981285
RgX_gtofp_bit 7048007
abs_update 8020955
mydbllogr 9565223
homothetie2n 9979079
_gen_nored 11198926
eval_rel_pol 13168351
fft 14194389
_gen_one 14470398
ZX_to_ZiX 16491815
pol_to_gaussint 17627124
_mp_add 24660408
_mp_cmul 34759227
myshiftrc 35577388
homothetie_gauss 36565663
lower_bound 41030162
findpower 41030214
graeffe 49605393
mydbllog2r 57612969
mygprec 63861838
ZiX_sqr 99231006
myshiftic 136082569
mygprecrc 215571698
mydbllog2i 226870330
dbllog2 304015074

Generated by: LCOV version 1.16