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 30818-1d7bcd2a3c) Lines: 1467 1530 95.9 %
Date: 2026-04-16 09:26:05 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 15201
_sqrtnr 22594
polrootsbound_i 27097
polrootsbound 27104
RgX_normalize1 35705
ZX_realroots_irred 48570
realroots 50627
ZX_sturm_irred 116665
ZX_sturm_i 123060
split_pols 166699
splitcauchy 166709
polsolve 166710
solve_exact_pol 231509
cleanroots 231763
isexactpol 240117
roots_com 240117
roots_aux 240145
checkvalidpol 267228
QX_complex_roots 296309
_gen_zero 326000
fix_roots1 398803
split_1 468814
conformal_mapping 468815
split_0_1 469185
split_0_2 469185
logradius 494963
update_radius 494965
optimize_split 494967
parameters 494968
split_2 494968
split_fromU 494968
split_0 495335
refine_F 503355
dft 503368
all_roots 536375
clean_roots 536427
fix_roots 537479
a_posteriori_errors 537482
mygprec_special 537489
logmodulus 608283
logpre_modulus 608283
abs_update_r 780193
ind_maxlog2 904393
isexactscalar 934122
isreal 963781
initdft 998333
dual_modulus 1014562
usp 1126082
ZX_sturmpart 1128257
check_ab 1178884
tocomplex 1215970
isvalidcoeff 1230557
ZX_Uspensky 1313851
conformal_basecase 1406557
conformal_pol 1406676
fujiwara_bound_real 1406917
split_complete 1528150
homothetie 1613710
append_clone 1616255
logmin_modulus 1617797
root_error 1914495
mygprecrc_special 2181498
ZX_rescale2prim 2233886
cmp_complex_appr 2241646
fujiwara_bound 2272809
checkbound 2354900
refine_H 2464719
scalepol 4297702
mygprec_absolute 4344369
_mp_mul 4374525
logmax_modulus 4458878
bkeval_single_power 5234718
splitpoleval 5235142
newton_polygon 5521243
X2XP1 5990749
_mp_sqr 6298185
dblexp 6563116
quicktofp 6984184
RgX_gtofp_bit 7048723
abs_update 8021552
mydbllogr 9566238
homothetie2n 9979778
_gen_nored 11202018
eval_rel_pol 13169610
fft 14196708
_gen_one 14470312
ZX_to_ZiX 16491667
pol_to_gaussint 17628458
_mp_add 24661072
_mp_cmul 34765457
myshiftrc 35580508
homothetie_gauss 36563970
findpower 41027613
lower_bound 41028221
graeffe 49602534
mydbllog2r 57618834
mygprec 63864834
ZiX_sqr 99220690
myshiftic 136094337
mygprecrc 215567383
mydbllog2i 226782084
dbllog2 303934432

Generated by: LCOV version 1.16