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 30831-19b50a36d0) Lines: 1467 1530 95.9 %
Date: 2026-04-21 09:26:02 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 296309
RgX_gtofp_bit 7048794
RgX_normalize1 35705
X2XP1 5990880
ZX_Uspensky 1313835
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15204
ZX_graeffe 5439
ZX_realroots_irred 48571
ZX_rescale2prim 2233960
ZX_sturm 6395
ZX_sturm_i 123066
ZX_sturm_irred 116671
ZX_sturmpart 1128244
ZX_to_ZiX 16490044
ZiX_sqr 99218461
_gen_nored 11200192
_gen_one 14469597
_gen_zero 325950
_intervalcmp 0
_mp_add 24660561
_mp_cmul 34762503
_mp_mul 4374486
_mp_sqr 6298110
_mp_sub 0
_sqrtnr 22596
a_posteriori_errors 537478
abs_update 8021521
abs_update_r 780197
all_roots 536376
append_clone 1616258
bkeval_single_power 5234748
check_ab 1178873
checkbound 2354873
checkvalidpol 267228
clean_roots 536424
cleanroots 231763
cmp_complex_appr 2241583
conformal_basecase 1406547
conformal_mapping 468810
conformal_pol 1406668
dblexp 6563038
dbllog2 303914889
dft 503360
dual_modulus 1014554
eval_rel_pol 13169572
fft 14196469
fft2 7462
findpower 41027416
fix_roots 537476
fix_roots1 398802
fujiwara_bound 2272788
fujiwara_bound_real 1406915
graeffe 49604042
homothetie 1613700
homothetie2n 9979794
homothetie_gauss 36563932
ind_maxlog2 904391
initdft 998324
isexactpol 240117
isexactscalar 934122
isreal 963774
isvalidcoeff 1230557
logmax_modulus 4458799
logmin_modulus 1617774
logmodulus 608288
logpre_modulus 608283
logradius 494964
lower_bound 41028490
mydbllog2i 226769121
mydbllog2r 57617832
mydbllogr 9566225
mygprec 63864978
mygprec_absolute 4344384
mygprec_special 537486
mygprecrc 215565083
mygprecrc_special 2181524
myshiftic 136085833
myshiftrc 35580099
newton_polygon 5521343
optimize_split 494966
parameters 494964
pol_to_gaussint 17628354
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166703
quicktofp 6984256
realroots 50627
refine_F 503353
refine_H 2464718
root_error 1914517
roots 8382
roots_aux 240145
roots_com 240117
rootsdeg0 42
scalepol 4297676
scalepol2n 0
sol_ok 3378
solve_exact_pol 231509
split_0 495337
split_0_1 469181
split_0_2 469181
split_1 468811
split_2 494963
split_complete 1528153
split_fromU 494965
split_pols 166703
splitcauchy 166711
splitpoleval 5234866
tocomplex 1215965
update_radius 494961
usp 1126086

Generated by: LCOV version 1.16