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 30391-f41a6adeb0) Lines: 1467 1530 95.9 %
Date: 2025-07-14 09:22:41 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 35886
ZX_realroots_irred 48622
realroots 50627
ZX_sturm_irred 116760
ZX_sturm_i 123155
polsolve 166633
split_pols 166634
splitcauchy 166640
solve_exact_pol 231040
cleanroots 231644
isexactpol 239634
roots_com 239634
roots_aux 239662
checkvalidpol 266940
QX_complex_roots 290015
_gen_zero 325981
fix_roots1 394080
conformal_mapping 467793
split_1 467793
split_0_1 468113
split_0_2 468114
logradius 493833
update_radius 493836
split_2 493837
optimize_split 493839
parameters 493839
split_fromU 493839
split_0 494160
refine_F 502222
dft 502227
all_roots 529606
clean_roots 529654
fix_roots 530651
a_posteriori_errors 530652
mygprec_special 530656
logmodulus 606600
logpre_modulus 606603
abs_update_r 778405
ind_maxlog2 902413
isexactscalar 931280
isreal 961630
initdft 996064
dual_modulus 1012179
usp 1125932
ZX_sturmpart 1128187
check_ab 1178814
tocomplex 1201005
isvalidcoeff 1229668
ZX_Uspensky 1313793
conformal_basecase 1403487
conformal_pol 1403607
fujiwara_bound_real 1406795
split_complete 1518974
append_clone 1603020
homothetie 1609662
logmin_modulus 1614415
root_error 1899182
mygprecrc_special 2161029
cmp_complex_appr 2231686
ZX_rescale2prim 2233673
fujiwara_bound 2265026
checkbound 2354758
refine_H 2459785
scalepol 4288154
mygprec_absolute 4300339
_mp_mul 4373429
logmax_modulus 4449816
splitpoleval 5223355
bkeval_single_power 5223464
newton_polygon 5505774
X2XP1 5990055
_mp_sqr 6291935
dblexp 6547398
quicktofp 6961023
RgX_gtofp_bit 7023370
abs_update 8003583
mydbllogr 9544760
homothetie2n 9955227
_gen_nored 11174753
eval_rel_pol 13134912
fft 14156899
_gen_one 14442614
ZX_to_ZiX 16455984
pol_to_gaussint 17584638
_mp_add 24649245
_mp_cmul 34727021
myshiftrc 35499645
homothetie_gauss 36489852
lower_bound 40946675
findpower 40946804
graeffe 49492805
mydbllog2r 56780781
mygprec 63700367
ZiX_sqr 99010147
myshiftic 135770901
mygprecrc 215000511
mydbllog2i 226322219
dbllog2 302603080

Generated by: LCOV version 1.16