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 30425-4669acb345) Lines: 1467 1530 95.9 %
Date: 2025-07-30 09:23:31 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 290022
RgX_gtofp_bit 7024741
RgX_normalize1 35887
X2XP1 5990346
ZX_Uspensky 1313924
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15275
ZX_graeffe 5383
ZX_realroots_irred 48624
ZX_rescale2prim 2233749
ZX_sturm 6395
ZX_sturm_i 123155
ZX_sturm_irred 116760
ZX_sturmpart 1128313
ZX_to_ZiX 16457993
ZiX_sqr 99037434
_gen_nored 11175289
_gen_one 14442528
_gen_zero 325992
_intervalcmp 0
_mp_add 24652874
_mp_cmul 34726401
_mp_mul 4373499
_mp_sqr 6291927
_mp_sub 0
_sqrtnr 22710
a_posteriori_errors 530774
abs_update 8004873
abs_update_r 778627
all_roots 529722
append_clone 1603384
bkeval_single_power 5223707
check_ab 1178939
checkbound 2355010
checkvalidpol 267053
clean_roots 529771
cleanroots 231756
cmp_complex_appr 2232072
conformal_basecase 1403850
conformal_mapping 467909
conformal_pol 1403969
dblexp 6548833
dbllog2 302676753
dft 502347
dual_modulus 1012430
eval_rel_pol 13137716
fft 14158928
fft2 7462
findpower 40957947
fix_roots 530773
fix_roots1 394200
fujiwara_bound 2265321
fujiwara_bound_real 1406909
graeffe 49507976
homothetie 1610035
homothetie2n 9957361
homothetie_gauss 36498825
ind_maxlog2 902654
initdft 996306
isexactpol 239746
isexactscalar 931728
isreal 961869
isvalidcoeff 1230123
logmax_modulus 4450901
logmin_modulus 1614829
logmodulus 606718
logpre_modulus 606720
logradius 493956
lower_bound 40957027
mydbllog2i 226379897
mydbllog2r 56786784
mydbllogr 9546117
mygprec 63713806
mygprec_absolute 4301019
mygprec_special 530776
mygprecrc 215031579
mygprecrc_special 2161525
myshiftic 135824515
myshiftrc 35506436
newton_polygon 5506874
optimize_split 493958
parameters 493957
pol_to_gaussint 17588564
polgraeffe 14
polmod_to_embed 84
polrootsbound 27300
polrootsbound_i 27293
polsolve 166631
quicktofp 6961851
realroots 50627
refine_F 502343
refine_H 2460309
root_error 1899554
roots 8018
roots_aux 239774
roots_com 239746
rootsdeg0 42
scalepol 4289252
scalepol2n 0
sol_ok 3378
solve_exact_pol 231152
split_0 494284
split_0_1 468231
split_0_2 468232
split_1 467910
split_2 493956
split_complete 1519330
split_fromU 493958
split_pols 166632
splitcauchy 166639
splitpoleval 5223747
tocomplex 1201121
update_radius 493959
usp 1126035

Generated by: LCOV version 1.16