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 30862-ea47bd413c) Lines: 1467 1530 95.9 %
Date: 2026-05-05 09:26:54 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 296338
RgX_gtofp_bit 7048867
RgX_normalize1 35838
X2XP1 5990897
ZX_Uspensky 1313950
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15274
ZX_graeffe 5439
ZX_realroots_irred 48652
ZX_rescale2prim 2233912
ZX_sturm 6395
ZX_sturm_i 123109
ZX_sturm_irred 116714
ZX_sturmpart 1128319
ZX_to_ZiX 16490116
ZiX_sqr 99230835
_gen_nored 11201318
_gen_one 14475145
_gen_zero 326031
_intervalcmp 0
_mp_add 24662461
_mp_cmul 34764785
_mp_mul 4375512
_mp_sqr 6299558
_mp_sub 0
_sqrtnr 22667
a_posteriori_errors 537512
abs_update 8021274
abs_update_r 780223
all_roots 536411
append_clone 1616315
bkeval_single_power 5236609
check_ab 1178946
checkbound 2355021
checkvalidpol 267361
clean_roots 536453
cleanroots 231763
cmp_complex_appr 2241693
conformal_basecase 1406569
conformal_mapping 468819
conformal_pol 1406687
dblexp 6563119
dbllog2 303898115
dft 503367
dual_modulus 1014565
eval_rel_pol 13169790
fft 14196261
fft2 7462
findpower 41030442
fix_roots 537511
fix_roots1 398823
fujiwara_bound 2274217
fujiwara_bound_real 1407052
graeffe 49604621
homothetie 1613723
homothetie2n 9979987
homothetie_gauss 36564775
ind_maxlog2 904407
initdft 998334
isexactpol 240117
isexactscalar 934122
isreal 963784
isvalidcoeff 1231117
logmax_modulus 4458945
logmin_modulus 1617773
logmodulus 608293
logpre_modulus 608292
logradius 494966
lower_bound 41030900
mydbllog2i 226758910
mydbllog2r 57629148
mydbllogr 9566055
mygprec 63865343
mygprec_absolute 4344593
mygprec_special 537518
mygprecrc 215565716
mygprecrc_special 2181618
myshiftic 136069695
myshiftrc 35580186
newton_polygon 5521382
optimize_split 494968
parameters 494969
pol_to_gaussint 17628661
polgraeffe 14
polmod_to_embed 84
polrootsbound 27237
polrootsbound_i 27230
polsolve 166747
quicktofp 6988253
realroots 50627
refine_F 503366
refine_H 2464693
root_error 1914579
roots 8382
roots_aux 240145
roots_com 240117
rootsdeg0 42
scalepol 4297738
scalepol2n 0
sol_ok 3378
solve_exact_pol 231509
split_0 495338
split_0_1 469186
split_0_2 469186
split_1 468818
split_2 494966
split_complete 1528191
split_fromU 494968
split_pols 166742
splitcauchy 166748
splitpoleval 5236073
tocomplex 1216025
update_radius 494969
usp 1126159

Generated by: LCOV version 1.16