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

Generated by: LCOV version 1.16