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) Coverage Total Hit
Test: PARI/GP v2.18.1 lcov report (development 31042-0fbe168e69) Lines: 94.1 % 1561 1469
Test Date: 2026-07-23 17:04:59 Functions: 96.7 % 121 117
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
_intervalcmp 0
_mp_sub 0
polgraeffe 0
scalepol2n 0
RgX_Graeffe 14
ZX_Uspensky_equal_yes 14
polgraeffe0 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 5460
ZX_sturm 6395
fft2 7462
roots 8382
ZX_deg1root 15274
_sqrtnr 22877
polrootsbound_i 27798
polrootsbound 27805
RgX_normalize1 36406
ZX_realroots_irred 48669
realroots 50627
ZX_sturm_irred 117167
ZX_sturm_i 123562
polsolve 166982
split_pols 166982
splitcauchy 166982
solve_exact_pol 231621
cleanroots 231875
isexactpol 240229
roots_com 240229
roots_aux 240257
checkvalidpol 268041
QX_complex_roots 297212
_gen_zero 326093
fix_roots1 398950
conformal_mapping 469140
split_1 469140
split_0_1 469512
split_0_2 469512
logradius 495267
optimize_split 495267
parameters 495267
split_2 495267
split_fromU 495267
update_radius 495267
split_0 495639
dft 503708
refine_F 503708
all_roots 537399
clean_roots 537441
a_posteriori_errors 538499
fix_roots 538499
mygprec_special 538499
logmodulus 608822
logpre_modulus 608822
abs_update_r 781158
ind_maxlog2 904868
isexactscalar 934563
isreal 964407
initdft 998975
dual_modulus 1015231
usp 1127972
ZX_sturmpart 1129084
check_ab 1179711
tocomplex 1219405
isvalidcoeff 1235239
ZX_Uspensky 1315181
conformal_basecase 1407539
conformal_pol 1407658
fujiwara_bound_real 1408294
split_complete 1529777
homothetie 1614928
logmin_modulus 1618136
append_clone 1618804
root_error 1919275
mygprecrc_special 2185073
ZX_rescale2prim 2237874
cmp_complex_appr 2249859
fujiwara_bound 2276778
checkbound 2356552
refine_H 2465973
scalepol 4300641
mygprec_absolute 4356165
_mp_mul 4430341
logmax_modulus 4461126
bkeval_single_power 5250141
splitpoleval 5250141
newton_polygon 5526612
X2XP1 6001446
_mp_sqr 6349508
dblexp 6569390
quicktofp 6998086
RgX_gtofp_bit 7056036
abs_update 8028236
mydbllogr 9573924
homothetie2n 9987738
_gen_nored 11267442
eval_rel_pol 13181373
fft 14225253
_gen_one 14524003
ZX_to_ZiX 16455376
pol_to_gaussint 17642499
_mp_add 24940866
_mp_cmul 35115055
myshiftrc 35616065
homothetie_gauss 36602777
findpower 41063903
lower_bound 41063903
graeffe 49673787
mydbllog2r 58105862
mygprec 63975816
ZiX_sqr 99347574
myshiftic 136510983
mygprecrc 215725291
mydbllog2i 227081292
dbllog2 304772662

Generated by: LCOV version 2.0-1