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 30838-aa3635ec72) Lines: 1467 1530 95.9 %
Date: 2026-04-28 09:25:50 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 296312
RgX_gtofp_bit 7048795
RgX_normalize1 35705
X2XP1 5990650
ZX_Uspensky 1313846
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15201
ZX_graeffe 5439
ZX_realroots_irred 48571
ZX_rescale2prim 2233838
ZX_sturm 6395
ZX_sturm_i 123048
ZX_sturm_irred 116652
ZX_sturmpart 1128260
ZX_to_ZiX 16489733
ZiX_sqr 99233577
_gen_nored 11192537
_gen_one 14465786
_gen_zero 325929
_intervalcmp 0
_mp_add 24654710
_mp_cmul 34743592
_mp_mul 4374283
_mp_sqr 6298006
_mp_sub 0
_sqrtnr 22592
a_posteriori_errors 537483
abs_update 8021543
abs_update_r 780192
all_roots 536384
append_clone 1616259
bkeval_single_power 5233576
check_ab 1178887
checkbound 2354902
checkvalidpol 267228
clean_roots 536424
cleanroots 231763
cmp_complex_appr 2241653
conformal_basecase 1406559
conformal_mapping 468812
conformal_pol 1406680
dblexp 6563085
dbllog2 303898895
dft 503363
dual_modulus 1014564
eval_rel_pol 13169773
fft 14196450
fft2 7462
findpower 41031801
fix_roots 537486
fix_roots1 398805
fujiwara_bound 2272800
fujiwara_bound_real 1406925
graeffe 49602354
homothetie 1613710
homothetie2n 9979818
homothetie_gauss 36564131
ind_maxlog2 904410
initdft 998327
isexactpol 240117
isexactscalar 934122
isreal 963780
isvalidcoeff 1230557
logmax_modulus 4458855
logmin_modulus 1617786
logmodulus 608284
logpre_modulus 608281
logradius 494962
lower_bound 41029761
mydbllog2i 226758772
mydbllog2r 57616963
mydbllogr 9566343
mygprec 63865899
mygprec_absolute 4344367
mygprec_special 537492
mygprecrc 215576405
mygprecrc_special 2181525
myshiftic 136057360
myshiftrc 35579746
newton_polygon 5521327
optimize_split 494966
parameters 494964
pol_to_gaussint 17628518
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166700
quicktofp 6984151
realroots 50627
refine_F 503358
refine_H 2464736
root_error 1914510
roots 8382
roots_aux 240145
roots_com 240117
rootsdeg0 42
scalepol 4297711
scalepol2n 0
sol_ok 3378
solve_exact_pol 231509
split_0 495332
split_0_1 469182
split_0_2 469184
split_1 468815
split_2 494964
split_complete 1528147
split_fromU 494965
split_pols 166702
splitcauchy 166709
splitpoleval 5234097
tocomplex 1215964
update_radius 494966
usp 1126068

Generated by: LCOV version 1.16