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-06 09:19:58 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 289563
RgX_gtofp_bit 7017678
RgX_normalize1 35705
X2XP1 5198853
ZX_Uspensky 1058839
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15243
ZX_graeffe 5383
ZX_realroots_irred 48346
ZX_rescale2prim 1934635
ZX_sturm 3735
ZX_sturm_i 120078
ZX_sturm_irred 116343
ZX_sturmpart 876253
ZX_to_ZiX 16452300
ZiX_sqr 98969848
_gen_nored 11120607
_gen_one 14369747
_gen_zero 323541
_intervalcmp 0
_mp_add 24573497
_mp_cmul 34593585
_mp_mul 4360415
_mp_sqr 6273541
_mp_sub 0
_sqrtnr 22675
a_posteriori_errors 530200
abs_update 7999408
abs_update_r 777909
all_roots 529153
append_clone 1601624
bkeval_single_power 5195300
check_ab 926874
checkbound 1850878
checkvalidpol 266759
clean_roots 529193
cleanroots 231644
cmp_complex_appr 2229149
conformal_basecase 1403359
conformal_mapping 467747
conformal_pol 1403476
dblexp 6544712
dbllog2 300311171
dft 501960
dual_modulus 1011646
eval_rel_pol 13126871
fft 14144243
fft2 7462
findpower 40933189
fix_roots 530201
fix_roots1 393868
fujiwara_bound 2005272
fujiwara_bound_real 1148936
graeffe 49472293
homothetie 1608614
homothetie2n 9949127
homothetie_gauss 36478365
ind_maxlog2 901888
initdft 995528
isexactpol 239634
isexactscalar 931280
isreal 961316
isvalidcoeff 1227239
logmax_modulus 4448378
logmin_modulus 1614070
logmodulus 606082
logpre_modulus 606083
logradius 493570
lower_bound 40933798
mydbllog2i 224217533
mydbllog2r 56091761
mydbllogr 9540504
mygprec 63672478
mygprec_absolute 4296464
mygprec_special 530203
mygprecrc 214920310
mygprecrc_special 2159188
myshiftic 135724143
myshiftrc 35480927
newton_polygon 5501115
optimize_split 493570
parameters 493565
pol_to_gaussint 17575343
polgraeffe 14
polmod_to_embed 84
polrootsbound 27118
polrootsbound_i 27111
polsolve 165669
quicktofp 6444357
realroots 50620
refine_F 501956
refine_H 2458919
root_error 1897284
roots 8018
roots_aux 239662
roots_com 239634
rootsdeg0 42
scalepol 4287117
scalepol2n 0
sol_ok 3378
solve_exact_pol 231040
split_0 493894
split_0_1 468069
split_0_2 468070
split_1 467748
split_2 493567
split_complete 1517983
split_fromU 493570
split_pols 165665
splitcauchy 165680
splitpoleval 5195261
tocomplex 1199996
update_radius 493569
usp 936445

Generated by: LCOV version 1.16