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 30824-18397de1d0) Lines: 1467 1530 95.9 %
Date: 2026-04-18 09:26:04 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 296301
RgX_gtofp_bit 7048550
RgX_normalize1 35705
X2XP1 5990593
ZX_Uspensky 1313866
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15203
ZX_graeffe 5439
ZX_realroots_irred 48566
ZX_rescale2prim 2233817
ZX_sturm 6395
ZX_sturm_i 123057
ZX_sturm_irred 116661
ZX_sturmpart 1128279
ZX_to_ZiX 16490479
ZiX_sqr 99215235
_gen_nored 11198679
_gen_one 14466542
_gen_zero 325961
_intervalcmp 0
_mp_add 24659422
_mp_cmul 34757968
_mp_mul 4374432
_mp_sqr 6297835
_mp_sub 0
_sqrtnr 22595
a_posteriori_errors 537477
abs_update 8021260
abs_update_r 780195
all_roots 536376
append_clone 1616239
bkeval_single_power 5233986
check_ab 1178906
checkbound 2354942
checkvalidpol 267228
clean_roots 536422
cleanroots 231763
cmp_complex_appr 2241586
conformal_basecase 1406546
conformal_mapping 468809
conformal_pol 1406663
dblexp 6562961
dbllog2 303913817
dft 503361
dual_modulus 1014539
eval_rel_pol 13169100
fft 14196230
fft2 7462
findpower 41028392
fix_roots 537476
fix_roots1 398797
fujiwara_bound 2272817
fujiwara_bound_real 1406936
graeffe 49602560
homothetie 1613675
homothetie2n 9979553
homothetie_gauss 36562464
ind_maxlog2 904374
initdft 998319
isexactpol 240117
isexactscalar 934122
isreal 963771
isvalidcoeff 1230557
logmax_modulus 4458824
logmin_modulus 1617779
logmodulus 608264
logpre_modulus 608267
logradius 494955
lower_bound 41028579
mydbllog2i 226764823
mydbllog2r 57617927
mydbllogr 9565988
mygprec 63863666
mygprec_absolute 4344339
mygprec_special 537488
mygprecrc 215559099
mygprecrc_special 2181503
myshiftic 136087515
myshiftrc 35579127
newton_polygon 5521141
optimize_split 494962
parameters 494956
pol_to_gaussint 17627975
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166704
quicktofp 6984176
realroots 50627
refine_F 503352
refine_H 2464679
root_error 1914500
roots 8382
roots_aux 240145
roots_com 240117
rootsdeg0 42
scalepol 4297632
scalepol2n 0
sol_ok 3378
solve_exact_pol 231509
split_0 495330
split_0_1 469178
split_0_2 469178
split_1 468810
split_2 494959
split_complete 1528136
split_fromU 494962
split_pols 166702
splitcauchy 166711
splitpoleval 5234452
tocomplex 1215950
update_radius 494958
usp 1126065

Generated by: LCOV version 1.16