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 30764-6b81f1f3fa) Lines: 1467 1530 95.9 %
Date: 2026-03-26 09:27:02 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 296308
RgX_gtofp_bit 7048096
RgX_normalize1 35705
X2XP1 5990565
ZX_Uspensky 1313863
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15205
ZX_graeffe 5439
ZX_realroots_irred 48571
ZX_rescale2prim 2233782
ZX_sturm 6395
ZX_sturm_i 123071
ZX_sturm_irred 116676
ZX_sturmpart 1128268
ZX_to_ZiX 16491358
ZiX_sqr 99237914
_gen_nored 11210202
_gen_one 14474959
_gen_zero 326007
_intervalcmp 0
_mp_add 24664385
_mp_cmul 34781441
_mp_mul 4374622
_mp_sqr 6298559
_mp_sub 0
_sqrtnr 22598
a_posteriori_errors 537468
abs_update 8021304
abs_update_r 780145
all_roots 536369
append_clone 1616172
bkeval_single_power 5235997
check_ab 1178895
checkbound 2354920
checkvalidpol 267214
clean_roots 536413
cleanroots 231763
cmp_complex_appr 2241498
conformal_basecase 1406469
conformal_mapping 468787
conformal_pol 1406589
dblexp 6562635
dbllog2 304084685
dft 503328
dual_modulus 1014489
eval_rel_pol 13168686
fft 14194532
fft2 7462
findpower 41032304
fix_roots 537473
fix_roots1 398792
fujiwara_bound 2271980
fujiwara_bound_real 1406937
graeffe 49610095
homothetie 1613584
homothetie2n 9979120
homothetie_gauss 36565841
ind_maxlog2 904352
initdft 998260
isexactpol 240103
isexactscalar 934017
isreal 963719
isvalidcoeff 1230445
logmax_modulus 4458667
logmin_modulus 1617699
logmodulus 608224
logpre_modulus 608222
logradius 494926
lower_bound 41032123
mydbllog2i 226904634
mydbllog2r 57612954
mydbllogr 9565595
mygprec 63864882
mygprec_absolute 4344169
mygprec_special 537477
mygprecrc 215574162
mygprecrc_special 2181419
myshiftic 136147281
myshiftrc 35578140
newton_polygon 5520760
optimize_split 494932
parameters 494933
pol_to_gaussint 17627374
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166695
quicktofp 6981392
realroots 50627
refine_F 503324
refine_H 2464615
root_error 1914418
roots 8368
roots_aux 240131
roots_com 240103
rootsdeg0 42
scalepol 4297448
scalepol2n 0
sol_ok 3378
solve_exact_pol 231495
split_0 495302
split_0_1 469155
split_0_2 469155
split_1 468787
split_2 494933
split_complete 1528078
split_fromU 494932
split_pols 166699
splitcauchy 166703
splitpoleval 5236378
tocomplex 1215874
update_radius 494933
usp 1126071

Generated by: LCOV version 1.16