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-23 09:26:12 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 296307
RgX_gtofp_bit 7048879
RgX_normalize1 35705
X2XP1 5990707
ZX_Uspensky 1313959
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15205
ZX_graeffe 5439
ZX_realroots_irred 48575
ZX_rescale2prim 2233844
ZX_sturm 6395
ZX_sturm_i 123072
ZX_sturm_irred 116677
ZX_sturmpart 1128355
ZX_to_ZiX 16492855
ZiX_sqr 99220548
_gen_nored 11203330
_gen_one 14471342
_gen_zero 326000
_intervalcmp 0
_mp_add 24662386
_mp_cmul 34767756
_mp_mul 4374479
_mp_sqr 6298315
_mp_sub 0
_sqrtnr 22598
a_posteriori_errors 537486
abs_update 8021988
abs_update_r 780196
all_roots 536379
append_clone 1616263
bkeval_single_power 5235347
check_ab 1178983
checkbound 2355095
checkvalidpol 267228
clean_roots 536420
cleanroots 231763
cmp_complex_appr 2241654
conformal_basecase 1406566
conformal_mapping 468819
conformal_pol 1406684
dblexp 6563096
dbllog2 303930717
dft 503371
dual_modulus 1014573
eval_rel_pol 13169841
fft 14196724
fft2 7462
findpower 41028835
fix_roots 537482
fix_roots1 398803
fujiwara_bound 2272917
fujiwara_bound_real 1407033
graeffe 49604757
homothetie 1613728
homothetie2n 9979926
homothetie_gauss 36564270
ind_maxlog2 904413
initdft 998342
isexactpol 240117
isexactscalar 934122
isreal 963788
isvalidcoeff 1230557
logmax_modulus 4458859
logmin_modulus 1617793
logmodulus 608294
logpre_modulus 608289
logradius 494969
lower_bound 41029409
mydbllog2i 226778597
mydbllog2r 57619120
mydbllogr 9566701
mygprec 63865524
mygprec_absolute 4344383
mygprec_special 537490
mygprecrc 215577469
mygprecrc_special 2181535
myshiftic 136100183
myshiftrc 35580117
newton_polygon 5521392
optimize_split 494971
parameters 494971
pol_to_gaussint 17628397
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166705
quicktofp 6984538
realroots 50627
refine_F 503362
refine_H 2464737
root_error 1914499
roots 8382
roots_aux 240145
roots_com 240117
rootsdeg0 42
scalepol 4297718
scalepol2n 0
sol_ok 3378
solve_exact_pol 231509
split_0 495338
split_0_1 469186
split_0_2 469187
split_1 468819
split_2 494970
split_complete 1528163
split_fromU 494970
split_pols 166703
splitcauchy 166712
splitpoleval 5235332
tocomplex 1215968
update_radius 494971
usp 1126158

Generated by: LCOV version 1.16