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 30316-0578a48613) Lines: 1467 1530 95.9 %
Date: 2025-06-04 09:19:51 Functions: 116 119 97.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_intervalcmp 0
_mp_sub 0
scalepol2n 0
ZX_Uspensky_equal_yes 14
polgraeffe 14
ZX_Uspensky_no 21
ZX_Uspensky_equal 28
rootsdeg0 42
FFT 56
FFTinv 56
polmod_to_embed 84
FFT_i 98
sol_ok 3350
ZX_sturm 3735
ZX_graeffe 5383
fft2 7462
roots 8018
ZX_deg1root 15247
_sqrtnr 22681
polrootsbound_i 27109
polrootsbound 27116
RgX_normalize1 35703
ZX_realroots_irred 48350
realroots 50613
ZX_sturm_irred 116348
ZX_sturm_i 120083
split_pols 165670
polsolve 165673
splitcauchy 165681
solve_exact_pol 231040
cleanroots 231644
isexactpol 239634
roots_com 239634
roots_aux 239662
checkvalidpol 266757
QX_complex_roots 289562
_gen_zero 323553
fix_roots1 393864
conformal_mapping 467746
split_1 467749
split_0_1 468073
split_0_2 468073
logradius 493567
parameters 493572
update_radius 493572
split_fromU 493573
optimize_split 493574
split_2 493574
split_0 493897
refine_F 501957
dft 501962
all_roots 529151
clean_roots 529197
a_posteriori_errors 530191
fix_roots 530192
mygprec_special 530200
logpre_modulus 606079
logmodulus 606083
abs_update_r 777908
ZX_sturmpart 876232
ind_maxlog2 901910
check_ab 926845
isexactscalar 931280
usp 936390
isreal 961321
initdft 995535
dual_modulus 1011656
ZX_Uspensky 1058807
fujiwara_bound_real 1148908
tocomplex 1199986
isvalidcoeff 1227233
conformal_basecase 1403363
conformal_pol 1403483
split_complete 1517987
append_clone 1601619
homothetie 1608613
logmin_modulus 1614090
checkbound 1850819
root_error 1897282
ZX_rescale2prim 1934392
fujiwara_bound 2005247
mygprecrc_special 2159169
cmp_complex_appr 2229145
refine_H 2458915
scalepol 4287133
mygprec_absolute 4296399
_mp_mul 4360491
logmax_modulus 4448396
splitpoleval 5195511
bkeval_single_power 5195630
X2XP1 5198340
newton_polygon 5501139
_mp_sqr 6273729
quicktofp 6444298
dblexp 6544741
RgX_gtofp_bit 7017682
abs_update 7999515
mydbllogr 9540494
homothetie2n 9949137
_gen_nored 11121757
eval_rel_pol 13126920
fft 14144237
_gen_one 14370641
ZX_to_ZiX 16454224
pol_to_gaussint 17575360
_mp_add 24575242
_mp_cmul 34598158
myshiftrc 35480720
homothetie_gauss 36478446
lower_bound 40934646
findpower 40935548
graeffe 49475455
mydbllog2r 56092256
mygprec 63672913
ZiX_sqr 98974719
myshiftic 135707134
mygprecrc 214921433
mydbllog2i 224226123
dbllog2 300324212

Generated by: LCOV version 1.16