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 30733-eb2d773d38) Lines: 1467 1530 95.9 %
Date: 2026-03-03 09:24:12 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 296310
RgX_gtofp_bit 7035364
RgX_normalize1 35733
X2XP1 5990966
ZX_Uspensky 1313980
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15204
ZX_graeffe 5439
ZX_realroots_irred 48572
ZX_rescale2prim 2233956
ZX_sturm 6395
ZX_sturm_i 123069
ZX_sturm_irred 116674
ZX_sturmpart 1128378
ZX_to_ZiX 16448476
ZiX_sqr 99070182
_gen_nored 11208428
_gen_one 14475599
_gen_zero 326017
_intervalcmp 0
_mp_add 24666225
_mp_cmul 34779461
_mp_mul 4374712
_mp_sqr 6298603
_mp_sub 0
_sqrtnr 22596
a_posteriori_errors 537119
abs_update 8008461
abs_update_r 779118
all_roots 536016
append_clone 1614324
bkeval_single_power 5235984
check_ab 1179005
checkbound 2355140
checkvalidpol 266892
clean_roots 536066
cleanroots 231763
cmp_complex_appr 2238476
conformal_basecase 1404253
conformal_mapping 468047
conformal_pol 1404373
dblexp 6551586
dbllog2 302213458
dft 502525
dual_modulus 1012838
eval_rel_pol 13144898
fft 14165360
fft2 7462
findpower 40966685
fix_roots 537119
fix_roots1 398479
fujiwara_bound 2271735
fujiwara_bound_real 1407051
graeffe 49526914
homothetie 1610797
homothetie2n 9962004
homothetie_gauss 36504324
ind_maxlog2 903062
initdft 996665
isexactpol 239753
isexactscalar 931714
isreal 962187
isvalidcoeff 1228149
logmax_modulus 4451747
logmin_modulus 1615139
logmodulus 607089
logpre_modulus 607091
logradius 494134
lower_bound 40966433
mydbllog2i 226510288
mydbllog2r 56187958
mydbllogr 9550247
mygprec 63775616
mygprec_absolute 4339641
mygprec_special 537125
mygprecrc 215224803
mygprecrc_special 2179233
myshiftic 135917943
myshiftrc 35519162
newton_polygon 5510528
optimize_split 494141
parameters 494141
pol_to_gaussint 17596721
polgraeffe 14
polmod_to_embed 84
polrootsbound 27132
polrootsbound_i 27125
polsolve 166706
quicktofp 6979505
realroots 50627
refine_F 502523
refine_H 2461193
root_error 1912455
roots 8018
roots_aux 239781
roots_com 239753
rootsdeg0 42
scalepol 4290631
scalepol2n 0
sol_ok 3378
solve_exact_pol 231145
split_0 494505
split_0_1 468402
split_0_2 468404
split_1 468046
split_2 494142
split_complete 1526129
split_fromU 494141
split_pols 166700
splitcauchy 166710
splitpoleval 5236694
tocomplex 1213847
update_radius 494139
usp 1126160

Generated by: LCOV version 1.16