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) Coverage Total Hit
Test: PARI/GP v2.19.0 lcov report (development 31092-e6893b0017) Lines: 94.1 % 1561 1469
Test Date: 2026-10-08 17:02:35 Functions: 96.7 % 121 117
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
FFT 56
FFT_i 98
FFTinv 56
QX_complex_roots 297215
RgX_Graeffe 14
RgX_gtofp_bit 7056133
RgX_normalize1 36408
X2XP1 6001301
ZX_Uspensky 1315150
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15275
ZX_graeffe 5460
ZX_realroots_irred 48669
ZX_rescale2prim 2237782
ZX_sturm 6395
ZX_sturm_i 123562
ZX_sturm_irred 117167
ZX_sturmpart 1129050
ZX_to_ZiX 16455524
ZiX_sqr 99347898
_gen_nored 11267932
_gen_one 14524606
_gen_zero 326083
_intervalcmp 0
_mp_add 24942089
_mp_cmul 35116696
_mp_mul 4430508
_mp_sqr 6349855
_mp_sub 0
_sqrtnr 22878
a_posteriori_errors 538503
abs_update 8028628
abs_update_r 781168
all_roots 537402
append_clone 1618823
bkeval_single_power 5250345
check_ab 1179681
checkbound 2356492
checkvalidpol 268043
clean_roots 537444
cleanroots 231875
cmp_complex_appr 2249874
conformal_basecase 1407530
conformal_mapping 469137
conformal_pol 1407649
dblexp 6569394
dbllog2 304773792
dft 503712
dual_modulus 1015246
eval_rel_pol 13181544
fft 14225737
fft2 7462
findpower 41063893
fix_roots 538503
fix_roots1 398954
fujiwara_bound 2276772
fujiwara_bound_real 1408258
graeffe 49673949
homothetie 1614948
homothetie2n 9987837
homothetie_gauss 36602761
ind_maxlog2 904890
initdft 998983
isexactpol 240229
isexactscalar 934563
isreal 964408
isvalidcoeff 1235245
logmax_modulus 4461132
logmin_modulus 1618138
logmodulus 608831
logpre_modulus 608831
logradius 495271
lower_bound 41063893
mydbllog2i 227081317
mydbllog2r 58107807
mydbllogr 9574312
mygprec 63982279
mygprec_absolute 4356222
mygprec_special 538503
mygprecrc 215747090
mygprecrc_special 2185096
myshiftic 136509529
myshiftrc 35615586
newton_polygon 5526705
optimize_split 495271
parameters 495271
pol_to_gaussint 17642676
polgraeffe 0
polgraeffe0 14
polmod_to_embed 84
polrootsbound 27807
polrootsbound_i 27800
polsolve 166988
quicktofp 7000117
realroots 50631
refine_F 503712
refine_H 2466384
root_error 1919301
roots 8382
roots_aux 240257
roots_com 240229
rootsdeg0 42
scalepol 4300635
scalepol2n 0
sol_ok 3378
solve_exact_pol 231621
split_0 495643
split_0_1 469509
split_0_2 469509
split_1 469137
split_2 495271
split_complete 1529789
split_fromU 495271
split_pols 166988
splitcauchy 166988
splitpoleval 5250345
tocomplex 1219419
update_radius 495271
usp 1127949

Generated by: LCOV version 2.0-1