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 30365-beea1ff998) Lines: 1467 1530 95.9 %
Date: 2025-07-02 09:21:24 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 3378
ZX_graeffe 5383
ZX_sturm 6395
fft2 7462
roots 8018
ZX_deg1root 15274
_sqrtnr 22709
polrootsbound_i 27293
polrootsbound 27299
RgX_normalize1 35887
ZX_realroots_irred 48624
realroots 50627
ZX_sturm_irred 116759
ZX_sturm_i 123154
split_pols 166632
polsolve 166634
splitcauchy 166638
solve_exact_pol 231040
cleanroots 231644
isexactpol 239634
roots_com 239634
roots_aux 239662
checkvalidpol 266941
QX_complex_roots 290019
_gen_zero 325972
fix_roots1 394079
conformal_mapping 467771
split_1 467774
split_0_1 468094
split_0_2 468094
logradius 493817
update_radius 493819
parameters 493821
split_2 493821
optimize_split 493822
split_fromU 493822
split_0 494145
dft 502209
refine_F 502210
all_roots 529607
clean_roots 529658
fix_roots 530655
a_posteriori_errors 530659
mygprec_special 530663
logmodulus 606591
logpre_modulus 606594
abs_update_r 778435
ind_maxlog2 902406
isexactscalar 931280
isreal 961596
initdft 996032
dual_modulus 1012156
usp 1125946
ZX_sturmpart 1128205
check_ab 1178832
tocomplex 1201016
isvalidcoeff 1229675
ZX_Uspensky 1313819
conformal_basecase 1403433
conformal_pol 1403552
fujiwara_bound_real 1406796
split_complete 1518930
append_clone 1603018
homothetie 1609625
logmin_modulus 1614317
root_error 1899213
mygprecrc_special 2161049
cmp_complex_appr 2231713
ZX_rescale2prim 2233696
fujiwara_bound 2265034
checkbound 2354794
refine_H 2459702
scalepol 4288032
mygprec_absolute 4300420
_mp_mul 4373512
logmax_modulus 4449574
bkeval_single_power 5223181
splitpoleval 5223367
newton_polygon 5505714
X2XP1 5990127
_mp_sqr 6291821
dblexp 6547129
quicktofp 6960905
RgX_gtofp_bit 7023276
abs_update 8003081
mydbllogr 9544052
homothetie2n 9954880
_gen_nored 11176647
eval_rel_pol 13134421
fft 14156680
_gen_one 14442014
ZX_to_ZiX 16450269
pol_to_gaussint 17584231
_mp_add 24650972
_mp_cmul 34729004
myshiftrc 35497744
homothetie_gauss 36483397
lower_bound 40942227
findpower 40942412
graeffe 49490567
mydbllog2r 56776200
mygprec 63697326
ZiX_sqr 98996499
myshiftic 135776907
mygprecrc 214975256
mydbllog2i 224278593
dbllog2 300556329

Generated by: LCOV version 1.16