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 30702-bddb8d6928) Lines: 1467 1530 95.9 %
Date: 2026-02-23 02:23:56 Functions: 116 119 97.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FFT 48
FFT_i 84
FFTinv 48
QX_complex_roots 252208
RgX_gtofp_bit 5959799
RgX_normalize1 30428
X2XP1 4825520
ZX_Uspensky 1056309
ZX_Uspensky_equal 21
ZX_Uspensky_equal_yes 10
ZX_Uspensky_no 16
ZX_deg1root 12933
ZX_graeffe 4596
ZX_realroots_irred 41345
ZX_rescale2prim 1799361
ZX_sturm 5310
ZX_sturm_i 104610
ZX_sturm_irred 99300
ZX_sturmpart 899007
ZX_to_ZiX 13843968
ZiX_sqr 84142266
_gen_nored 9311845
_gen_one 12058992
_gen_zero 275098
_intervalcmp 0
_mp_add 19364586
_mp_cmul 27846418
_mp_mul 3356261
_mp_sqr 5026890
_mp_sub 0
_sqrtnr 19226
a_posteriori_errors 458560
abs_update 6744632
abs_update_r 663364
all_roots 457623
append_clone 1374278
bkeval_single_power 4378465
check_ab 941332
checkbound 1880480
checkvalidpol 228512
clean_roots 457657
cleanroots 198649
cmp_complex_appr 1895913
conformal_basecase 1193115
conformal_mapping 397674
conformal_pol 1193208
dblexp 5554339
dbllog2 255282000
dft 426715
dual_modulus 859782
eval_rel_pol 11137496
fft 11891275
fft2 6396
findpower 34808587
fix_roots 458560
fix_roots1 340335
fujiwara_bound 1867365
fujiwara_bound_real 1136368
graeffe 42071133
homothetie 1366357
homothetie2n 8449452
homothetie_gauss 31026311
ind_maxlog2 767108
initdft 846465
isexactpol 205449
isexactscalar 798161
isreal 817424
isvalidcoeff 1049696
logmax_modulus 3782276
logmin_modulus 1372326
logmodulus 514270
logpre_modulus 514270
logradius 419750
lower_bound 34808587
mydbllog2i 191806337
mydbllog2r 46888500
mydbllogr 8052604
mygprec 54166026
mygprec_absolute 3688698
mygprec_special 458560
mygprecrc 181905723
mygprecrc_special 1856620
myshiftic 115274367
myshiftrc 30054077
newton_polygon 4667176
optimize_split 419750
parameters 419750
pol_to_gaussint 14919772
polgraeffe 10
polmod_to_embed 69
polrootsbound 23057
polrootsbound_i 23052
polsolve 139610
quicktofp 5761789
realroots 42325
refine_F 426715
refine_H 2094656
root_error 1627595
roots 6823
roots_aux 205472
roots_com 205449
rootsdeg0 30
scalepol 3645294
scalepol2n 0
sol_ok 2780
solve_exact_pol 198073
split_0 420042
split_0_1 397966
split_0_2 397966
split_1 397674
split_2 419750
split_complete 1298644
split_fromU 419750
split_pols 139610
splitcauchy 139610
splitpoleval 4378465
tocomplex 1030828
update_radius 419750
usp 905820

Generated by: LCOV version 1.16