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 30851-7844d7b3a5) Lines: 1467 1530 95.9 %
Date: 2026-05-03 09:26:29 Functions: 116 119 97.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_intervalcmp 0
_mp_sub 0
scalepol2n 0
ZX_Uspensky_equal_yes 14
polgraeffe 14
ZX_Uspensky_no 21
ZX_Uspensky_equal 28
rootsdeg0 42
FFT 56
FFTinv 56
polmod_to_embed 84
FFT_i 98
sol_ok 3378
ZX_graeffe 5439
ZX_sturm 6395
fft2 7462
roots 8382
ZX_deg1root 15204
_sqrtnr 22596
polrootsbound_i 27230
polrootsbound 27237
RgX_normalize1 35838
ZX_realroots_irred 48572
realroots 50627
ZX_sturm_irred 116681
ZX_sturm_i 123076
split_pols 166694
polsolve 166695
splitcauchy 166709
solve_exact_pol 231509
cleanroots 231763
isexactpol 240117
roots_com 240117
roots_aux 240145
checkvalidpol 267361
QX_complex_roots 296326
_gen_zero 326001
fix_roots1 398818
conformal_mapping 468825
split_1 468825
split_0_1 469197
split_0_2 469197
logradius 494972
update_radius 494973
optimize_split 494976
parameters 494976
split_2 494976
split_fromU 494976
split_0 495345
refine_F 503373
dft 503377
all_roots 536396
clean_roots 536444
fix_roots 537498
a_posteriori_errors 537502
mygprec_special 537508
logmodulus 608298
logpre_modulus 608298
abs_update_r 780192
ind_maxlog2 904432
isexactscalar 934122
isreal 963800
initdft 998350
dual_modulus 1014582
usp 1126184
ZX_sturmpart 1128363
check_ab 1178989
tocomplex 1216021
isvalidcoeff 1231117
ZX_Uspensky 1313966
conformal_basecase 1406590
conformal_pol 1406710
fujiwara_bound_real 1407042
split_complete 1528184
homothetie 1613740
append_clone 1616304
logmin_modulus 1617847
root_error 1914568
mygprecrc_special 2181584
ZX_rescale2prim 2233989
cmp_complex_appr 2241650
fujiwara_bound 2274095
checkbound 2355108
refine_H 2464787
scalepol 4297762
mygprec_absolute 4344571
_mp_mul 4374467
logmax_modulus 4459143
splitpoleval 5234953
bkeval_single_power 5235230
newton_polygon 5521442
X2XP1 5991054
_mp_sqr 6298325
dblexp 6563248
quicktofp 6987961
RgX_gtofp_bit 7048926
abs_update 8021543
mydbllogr 9566372
homothetie2n 9980182
_gen_nored 11198239
eval_rel_pol 13169884
fft 14196339
_gen_one 14470987
ZX_to_ZiX 16494878
pol_to_gaussint 17629000
_mp_add 24659163
_mp_cmul 34757022
myshiftrc 35581816
homothetie_gauss 36567561
lower_bound 41034065
findpower 41034428
graeffe 49606697
mydbllog2r 57624948
mygprec 63866818
ZiX_sqr 99238475
myshiftic 136079468
mygprecrc 215585917
mydbllog2i 226784593
dbllog2 303924675

Generated by: LCOV version 1.16