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 30370-b9c4b6d044) Lines: 1467 1530 95.9 %
Date: 2025-07-05 09:22:59 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 27291
polrootsbound 27297
RgX_normalize1 35885
ZX_realroots_irred 48623
realroots 50627
ZX_sturm_irred 116761
ZX_sturm_i 123156
split_pols 166632
polsolve 166633
splitcauchy 166637
solve_exact_pol 231040
cleanroots 231644
isexactpol 239634
roots_com 239634
roots_aux 239662
checkvalidpol 266938
QX_complex_roots 290019
_gen_zero 326013
fix_roots1 394080
split_1 467783
conformal_mapping 467784
split_0_1 468107
split_0_2 468107
logradius 493823
update_radius 493825
split_2 493827
optimize_split 493829
parameters 493829
split_fromU 493829
split_0 494150
refine_F 502213
dft 502216
all_roots 529611
clean_roots 529653
fix_roots 530652
a_posteriori_errors 530654
mygprec_special 530659
logmodulus 606590
logpre_modulus 606592
abs_update_r 778399
ind_maxlog2 902408
isexactscalar 931280
isreal 961613
initdft 996043
dual_modulus 1012168
usp 1125930
ZX_sturmpart 1128166
check_ab 1178793
tocomplex 1201002
isvalidcoeff 1229664
ZX_Uspensky 1313774
conformal_basecase 1403465
conformal_pol 1403584
fujiwara_bound_real 1406778
split_complete 1518952
append_clone 1603018
homothetie 1609642
logmin_modulus 1614388
root_error 1899186
mygprecrc_special 2161033
cmp_complex_appr 2231690
ZX_rescale2prim 2233648
fujiwara_bound 2265019
checkbound 2354716
refine_H 2459746
scalepol 4288083
mygprec_absolute 4300385
_mp_mul 4373429
logmax_modulus 4449729
splitpoleval 5223896
bkeval_single_power 5224243
newton_polygon 5505708
X2XP1 5990016
_mp_sqr 6292087
dblexp 6547253
quicktofp 6960961
RgX_gtofp_bit 7023303
abs_update 8003592
mydbllogr 9544467
homothetie2n 9955042
_gen_nored 11177287
eval_rel_pol 13134815
fft 14157150
_gen_one 14443976
ZX_to_ZiX 16457935
pol_to_gaussint 17584512
_mp_add 24652123
_mp_cmul 34730881
myshiftrc 35498418
homothetie_gauss 36493423
lower_bound 40947371
findpower 40948570
graeffe 49498592
mydbllog2r 56780139
mygprec 63700479
ZiX_sqr 99022414
myshiftic 135786300
mygprecrc 215009384
mydbllog2i 224313917
dbllog2 300593753

Generated by: LCOV version 1.16