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.19.0 lcov report (development 31092-e6893b0017) Lines: 94.1 % 1561 1469
Test Date: 2026-11-12 17:03:01 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 15275
_sqrtnr 22878
polrootsbound_i 27798
polrootsbound 27805
RgX_normalize1 36406
ZX_realroots_irred 48670
realroots 50631
ZX_sturm_irred 117167
ZX_sturm_i 123562
polsolve 166990
split_pols 166990
splitcauchy 166990
solve_exact_pol 231621
cleanroots 231875
isexactpol 240229
roots_com 240229
roots_aux 240257
checkvalidpol 268041
QX_complex_roots 297214
_gen_zero 326083
fix_roots1 398956
conformal_mapping 469143
split_1 469143
split_0_1 469515
split_0_2 469515
logradius 495278
optimize_split 495278
parameters 495278
split_2 495278
split_fromU 495278
update_radius 495278
split_0 495650
dft 503717
refine_F 503717
all_roots 537401
clean_roots 537443
a_posteriori_errors 538502
fix_roots 538502
mygprec_special 538502
logmodulus 608836
logpre_modulus 608836
abs_update_r 781190
ind_maxlog2 904879
isexactscalar 934563
isreal 964421
initdft 998995
dual_modulus 1015246
usp 1127927
ZX_sturmpart 1129049
check_ab 1179680
tocomplex 1219407
isvalidcoeff 1235239
ZX_Uspensky 1315150
conformal_basecase 1407548
conformal_pol 1407667
fujiwara_bound_real 1408259
split_complete 1529802
homothetie 1614951
logmin_modulus 1618157
append_clone 1618827
root_error 1919290
mygprecrc_special 2185099
ZX_rescale2prim 2237677
cmp_complex_appr 2249832
fujiwara_bound 2276771
checkbound 2356490
refine_H 2466406
scalepol 4300692
mygprec_absolute 4356184
_mp_mul 4430508
logmax_modulus 4461186
bkeval_single_power 5250403
splitpoleval 5250403
newton_polygon 5526717
X2XP1 6001069
_mp_sqr 6349893
dblexp 6569527
quicktofp 7000032
RgX_gtofp_bit 7056147
abs_update 8028288
mydbllogr 9573981
homothetie2n 9987903
_gen_nored 11268048
eval_rel_pol 13181565
fft 14225519
_gen_one 14524760
ZX_to_ZiX 16455226
pol_to_gaussint 17642751
_mp_add 24942127
_mp_cmul 35116850
myshiftrc 35617301
homothetie_gauss 36603282
findpower 41064468
lower_bound 41064468
graeffe 49674480
mydbllog2r 58109232
mygprec 63982529
ZiX_sqr 99348960
myshiftic 136515627
mygprecrc 215744210
mydbllog2i 227087536
dbllog2 304781912

Generated by: LCOV version 2.0-1