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 30835-e55edf4b45) Lines: 1467 1530 95.9 %
Date: 2026-04-24 09:27:20 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 296310
RgX_gtofp_bit 7048668
RgX_normalize1 35705
X2XP1 5990431
ZX_Uspensky 1313897
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15201
ZX_graeffe 5439
ZX_realroots_irred 48572
ZX_rescale2prim 2233747
ZX_sturm 6395
ZX_sturm_i 123064
ZX_sturm_irred 116669
ZX_sturmpart 1128305
ZX_to_ZiX 16493366
ZiX_sqr 99228389
_gen_nored 11195340
_gen_one 14467908
_gen_zero 325981
_intervalcmp 0
_mp_add 24657158
_mp_cmul 34751091
_mp_mul 4374382
_mp_sqr 6297954
_mp_sub 0
_sqrtnr 22594
a_posteriori_errors 537481
abs_update 8021517
abs_update_r 780179
all_roots 536380
append_clone 1616240
bkeval_single_power 5234249
check_ab 1178931
checkbound 2354992
checkvalidpol 267228
clean_roots 536420
cleanroots 231763
cmp_complex_appr 2241627
conformal_basecase 1406556
conformal_mapping 468813
conformal_pol 1406676
dblexp 6563024
dbllog2 303898116
dft 503364
dual_modulus 1014553
eval_rel_pol 13169508
fft 14196309
fft2 7462
findpower 41030262
fix_roots 537483
fix_roots1 398802
fujiwara_bound 2272866
fujiwara_bound_real 1406980
graeffe 49603188
homothetie 1613684
homothetie2n 9979728
homothetie_gauss 36563149
ind_maxlog2 904412
initdft 998325
isexactpol 240117
isexactscalar 934122
isreal 963777
isvalidcoeff 1230557
logmax_modulus 4458878
logmin_modulus 1617799
logmodulus 608273
logpre_modulus 608267
logradius 494953
lower_bound 41029910
mydbllog2i 226760482
mydbllog2r 57618806
mydbllogr 9566297
mygprec 63865157
mygprec_absolute 4344411
mygprec_special 537488
mygprecrc 215576516
mygprecrc_special 2181503
myshiftic 136061008
myshiftrc 35579745
newton_polygon 5521228
optimize_split 494963
parameters 494960
pol_to_gaussint 17628426
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166704
quicktofp 6984238
realroots 50627
refine_F 503360
refine_H 2464707
root_error 1914480
roots 8382
roots_aux 240145
roots_com 240117
rootsdeg0 42
scalepol 4297645
scalepol2n 0
sol_ok 3378
solve_exact_pol 231509
split_0 495334
split_0_1 469183
split_0_2 469183
split_1 468815
split_2 494963
split_complete 1528144
split_fromU 494963
split_pols 166701
splitcauchy 166706
splitpoleval 5234535
tocomplex 1215958
update_radius 494961
usp 1126050

Generated by: LCOV version 1.16