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 30318-7d854b8994) Lines: 1467 1530 95.9 %
Date: 2025-06-07 09:19:48 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 289561
RgX_gtofp_bit 7017652
RgX_normalize1 35705
X2XP1 5198412
ZX_Uspensky 1058798
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15245
ZX_graeffe 5383
ZX_realroots_irred 48350
ZX_rescale2prim 1934410
ZX_sturm 3735
ZX_sturm_i 120082
ZX_sturm_irred 116347
ZX_sturmpart 876217
ZX_to_ZiX 16454498
ZiX_sqr 98977473
_gen_nored 11121978
_gen_one 14370492
_gen_zero 323549
_intervalcmp 0
_mp_add 24575006
_mp_cmul 34597281
_mp_mul 4360524
_mp_sqr 6273642
_mp_sub 0
_sqrtnr 22680
a_posteriori_errors 530202
abs_update 7999513
abs_update_r 777902
all_roots 529151
append_clone 1601618
bkeval_single_power 5195590
check_ab 926837
checkbound 1850804
checkvalidpol 266759
clean_roots 529199
cleanroots 231644
cmp_complex_appr 2229138
conformal_basecase 1403378
conformal_mapping 467753
conformal_pol 1403496
dblexp 6544836
dbllog2 300336884
dft 501963
dual_modulus 1011647
eval_rel_pol 13126825
fft 14144026
fft2 7462
findpower 40935042
fix_roots 530201
fix_roots1 393868
fujiwara_bound 2005241
fujiwara_bound_real 1148896
graeffe 49474593
homothetie 1608613
homothetie2n 9949237
homothetie_gauss 36479557
ind_maxlog2 901891
initdft 995539
isexactpol 239634
isexactscalar 931280
isreal 961329
isvalidcoeff 1227239
logmax_modulus 4448467
logmin_modulus 1614109
logmodulus 606083
logpre_modulus 606084
logradius 493571
lower_bound 40934994
mydbllog2i 224233386
mydbllog2r 56092969
mydbllogr 9540440
mygprec 63673683
mygprec_absolute 4296455
mygprec_special 530203
mygprecrc 214928279
mygprecrc_special 2159198
myshiftic 135737702
myshiftrc 35481484
newton_polygon 5501086
optimize_split 493576
parameters 493574
pol_to_gaussint 17575307
polgraeffe 14
polmod_to_embed 84
polrootsbound 27118
polrootsbound_i 27111
polsolve 165676
quicktofp 6444282
realroots 50620
refine_F 501958
refine_H 2458921
root_error 1897281
roots 8018
roots_aux 239662
roots_com 239634
rootsdeg0 42
scalepol 4287156
scalepol2n 0
sol_ok 3378
solve_exact_pol 231040
split_0 493899
split_0_1 468074
split_0_2 468074
split_1 467753
split_2 493573
split_complete 1517993
split_fromU 493576
split_pols 165672
splitcauchy 165678
splitpoleval 5195531
tocomplex 1199995
update_radius 493574
usp 936432

Generated by: LCOV version 1.16