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-02 09:19:41 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 289562
RgX_gtofp_bit 7017719
RgX_normalize1 35705
X2XP1 5198509
ZX_Uspensky 1058766
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15247
ZX_graeffe 5383
ZX_realroots_irred 48350
ZX_rescale2prim 1934492
ZX_sturm 3735
ZX_sturm_i 120083
ZX_sturm_irred 116348
ZX_sturmpart 876193
ZX_to_ZiX 16450956
ZiX_sqr 98967018
_gen_nored 11122425
_gen_one 14369690
_gen_zero 323547
_intervalcmp 0
_mp_add 24576426
_mp_cmul 34600051
_mp_mul 4360553
_mp_sqr 6273787
_mp_sub 0
_sqrtnr 22682
a_posteriori_errors 530195
abs_update 7999380
abs_update_r 777936
all_roots 529153
append_clone 1601621
bkeval_single_power 5195587
check_ab 926806
checkbound 1850739
checkvalidpol 266759
clean_roots 529193
cleanroots 231644
cmp_complex_appr 2229135
conformal_basecase 1403359
conformal_mapping 467746
conformal_pol 1403477
dblexp 6544772
dbllog2 300306591
dft 501959
dual_modulus 1011646
eval_rel_pol 13126926
fft 14144619
fft2 7462
findpower 40933875
fix_roots 530192
fix_roots1 393864
fujiwara_bound 2005210
fujiwara_bound_real 1148873
graeffe 49473439
homothetie 1608613
homothetie2n 9949093
homothetie_gauss 36476877
ind_maxlog2 901868
initdft 995529
isexactpol 239634
isexactscalar 931280
isreal 961317
isvalidcoeff 1227239
logmax_modulus 4448336
logmin_modulus 1614062
logmodulus 606087
logpre_modulus 606083
logradius 493565
lower_bound 40932950
mydbllog2i 224215089
mydbllog2r 56091387
mydbllogr 9540356
mygprec 63671338
mygprec_absolute 4296394
mygprec_special 530200
mygprecrc 214910362
mygprecrc_special 2159187
myshiftic 135700154
myshiftrc 35480852
newton_polygon 5501151
optimize_split 493570
parameters 493571
pol_to_gaussint 17575274
polgraeffe 14
polmod_to_embed 84
polrootsbound 27118
polrootsbound_i 27111
polsolve 165672
quicktofp 6444261
realroots 50613
refine_F 501957
refine_H 2458888
root_error 1897268
roots 8018
roots_aux 239662
roots_com 239634
rootsdeg0 42
scalepol 4287090
scalepol2n 0
sol_ok 3350
solve_exact_pol 231040
split_0 493891
split_0_1 468066
split_0_2 468066
split_1 467748
split_2 493571
split_complete 1517985
split_fromU 493570
split_pols 165670
splitcauchy 165680
splitpoleval 5195436
tocomplex 1199999
update_radius 493571
usp 936401

Generated by: LCOV version 1.16