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 31041-bd73e9fcdd) Lines: 94.2 % 1561 1470
Test Date: 2026-07-22 22:45:42 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 27800
polrootsbound 27807
RgX_normalize1 36408
ZX_realroots_irred 48668
realroots 50627
ZX_sturm_irred 117163
ZX_sturm_i 123558
polsolve 166971
split_pols 166976
splitcauchy 166980
solve_exact_pol 231621
cleanroots 231875
isexactpol 240229
roots_com 240229
roots_aux 240257
checkvalidpol 268043
QX_complex_roots 297203
_gen_zero 326030
fix_roots1 398949
split_1 469124
conformal_mapping 469126
split_0_1 469493
split_0_2 469494
update_radius 495255
logradius 495257
split_2 495257
split_fromU 495258
optimize_split 495259
parameters 495259
split_0 495629
refine_F 503690
dft 503700
all_roots 537385
clean_roots 537434
fix_roots 538490
a_posteriori_errors 538493
mygprec_special 538495
logmodulus 608816
logpre_modulus 608816
abs_update_r 781157
ind_maxlog2 904839
isexactscalar 934563
isreal 964382
initdft 998957
dual_modulus 1015194
usp 1127825
ZX_sturmpart 1128935
check_ab 1179563
tocomplex 1219382
isvalidcoeff 1235245
ZX_Uspensky 1315028
conformal_basecase 1407487
conformal_pol 1407606
fujiwara_bound_real 1408132
split_complete 1529745
homothetie 1614881
logmin_modulus 1618088
append_clone 1618769
root_error 1919216
mygprecrc_special 2185045
ZX_rescale2prim 2237594
cmp_complex_appr 2249761
fujiwara_bound 2276602
checkbound 2356256
refine_H 2465884
scalepol 4300453
mygprec_absolute 4355847
_mp_mul 4429697
logmax_modulus 4460906
splitpoleval 5245734
bkeval_single_power 5246231
newton_polygon 5526473
X2XP1 6000746
_mp_sqr 6348292
dblexp 6568890
quicktofp 6997488
RgX_gtofp_bit 7055846
abs_update 8026400
mydbllogr 9572431
homothetie2n 9987030
_gen_nored 11234358
eval_rel_pol 13180337
fft 14224039
_gen_one 14509099
ZX_to_ZiX 16441572
pol_to_gaussint 17641202
_mp_add 24920293
_mp_cmul 35041553
myshiftrc 35613427
homothetie_gauss 36582262
lower_bound 41051549
findpower 41052048
graeffe 49632838
mydbllog2r 58096677
mygprec 63959448
ZiX_sqr 99289138
myshiftic 136186856
mygprecrc 215653226
mydbllog2i 226870160
dbllog2 304402897

Generated by: LCOV version 2.0-1