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 30849-48ff4d246c) Lines: 1467 1530 95.9 %
Date: 2026-05-01 09:26:53 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 8382
ZX_deg1root 15203
_sqrtnr 22596
polrootsbound_i 27230
polrootsbound 27237
RgX_normalize1 35838
ZX_realroots_irred 48570
realroots 50627
ZX_sturm_irred 116685
ZX_sturm_i 123080
split_pols 166695
polsolve 166699
splitcauchy 166710
solve_exact_pol 231509
cleanroots 231763
isexactpol 240117
roots_com 240117
roots_aux 240145
checkvalidpol 267361
QX_complex_roots 296326
_gen_zero 326030
fix_roots1 398816
conformal_mapping 468802
split_1 468803
split_0_1 469173
split_0_2 469173
update_radius 494950
logradius 494954
parameters 494954
split_2 494954
optimize_split 494956
split_fromU 494956
split_0 495326
refine_F 503348
dft 503355
all_roots 536394
clean_roots 536442
fix_roots 537497
a_posteriori_errors 537501
mygprec_special 537504
logmodulus 608276
logpre_modulus 608276
abs_update_r 780202
ind_maxlog2 904392
isexactscalar 934122
isreal 963758
initdft 998308
dual_modulus 1014548
usp 1126075
ZX_sturmpart 1128263
check_ab 1178890
tocomplex 1215987
isvalidcoeff 1231117
ZX_Uspensky 1313871
conformal_basecase 1406523
conformal_pol 1406642
fujiwara_bound_real 1406960
split_complete 1528138
homothetie 1613691
append_clone 1616271
logmin_modulus 1617715
root_error 1914527
mygprecrc_special 2181568
ZX_rescale2prim 2233762
cmp_complex_appr 2241656
fujiwara_bound 2274014
checkbound 2354910
refine_H 2464660
scalepol 4297584
mygprec_absolute 4344436
_mp_mul 4374512
logmax_modulus 4458834
splitpoleval 5235209
bkeval_single_power 5235639
newton_polygon 5521266
X2XP1 5990498
_mp_sqr 6298417
dblexp 6562971
quicktofp 6987759
RgX_gtofp_bit 7048730
abs_update 8021308
mydbllogr 9566068
homothetie2n 9979720
_gen_nored 11199841
eval_rel_pol 13169546
fft 14196334
_gen_one 14472074
ZX_to_ZiX 16489637
pol_to_gaussint 17628351
_mp_add 24660208
_mp_cmul 34761514
myshiftrc 35579385
homothetie_gauss 36563597
lower_bound 41029933
findpower 41030223
graeffe 49601892
mydbllog2r 57620755
mygprec 63864151
ZiX_sqr 99228927
myshiftic 136062326
mygprecrc 215560131
mydbllog2i 226757165
dbllog2 303885267

Generated by: LCOV version 1.16