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 30499-74bdd0ac5b) Lines: 1468 1530 95.9 %
Date: 2025-09-18 09:23:44 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 296411
RgX_gtofp_bit 7031074
RgX_normalize1 35885
X2XP1 5990361
ZX_Uspensky 1313857
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15274
ZX_graeffe 5390
ZX_realroots_irred 48653
ZX_rescale2prim 2233749
ZX_sturm 6395
ZX_sturm_i 123168
ZX_sturm_irred 116773
ZX_sturmpart 1128212
ZX_to_ZiX 16456259
ZiX_sqr 99035006
_gen_nored 11200672
_gen_one 14474066
_gen_zero 326164
_intervalcmp 0
_mp_add 24662599
_mp_cmul 34763004
_mp_mul 4374536
_mp_sqr 6298298
_mp_sub 0
_sqrtnr 22709
a_posteriori_errors 537152
abs_update 8004638
abs_update_r 778631
all_roots 536105
append_clone 1613947
bkeval_single_power 5236175
check_ab 1178840
checkbound 2354810
checkvalidpol 267044
clean_roots 536150
cleanroots 231749
cmp_complex_appr 2238490
conformal_basecase 1403807
conformal_mapping 467896
conformal_pol 1403926
dblexp 6548707
dbllog2 302684849
dft 502339
dual_modulus 1012409
eval_rel_pol 13137395
fft 14158461
fft2 7462
findpower 40955762
fix_roots 537154
fix_roots1 398396
fujiwara_bound 2271729
fujiwara_bound_real 1406889
graeffe 49506989
homothetie 1610007
homothetie2n 9957189
homothetie_gauss 36497981
ind_maxlog2 902627
initdft 996286
isexactpol 239739
isexactscalar 931700
isreal 961847
isvalidcoeff 1230089
logmax_modulus 4450728
logmin_modulus 1614751
logmodulus 606715
logpre_modulus 606714
logradius 493947
lower_bound 40955340
mydbllog2i 226418032
mydbllog2r 56768892
mydbllogr 9545805
mygprec 63752797
mygprec_absolute 4339337
mygprec_special 537156
mygprecrc 215174266
mygprecrc_special 2178466
myshiftic 135830878
myshiftrc 35505635
newton_polygon 5506818
optimize_split 493949
parameters 493947
pol_to_gaussint 17588233
polgraeffe 14
polmod_to_embed 84
polrootsbound 27298
polrootsbound_i 27291
polsolve 166724
quicktofp 6978933
realroots 50627
refine_F 502336
refine_H 2460291
root_error 1912334
roots 8018
roots_aux 239767
roots_com 239739
rootsdeg0 42
scalepol 4289133
scalepol2n 0
sol_ok 3378
solve_exact_pol 231145
split_0 494273
split_0_1 468223
split_0_2 468223
split_1 467899
split_2 493946
split_complete 1525695
split_fromU 493948
split_pols 166712
splitcauchy 166729
splitpoleval 5236102
tocomplex 1213905
update_radius 493946
usp 1126039

Generated by: LCOV version 1.16