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 30775-9d8a55740a) Lines: 1467 1530 95.9 %
Date: 2026-04-06 09:26:18 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 8368
ZX_deg1root 15204
_sqrtnr 22596
polrootsbound_i 27097
polrootsbound 27104
RgX_normalize1 35705
ZX_realroots_irred 48569
realroots 50627
ZX_sturm_irred 116674
ZX_sturm_i 123069
polsolve 166695
split_pols 166699
splitcauchy 166710
solve_exact_pol 231495
cleanroots 231763
isexactpol 240103
roots_com 240103
roots_aux 240131
checkvalidpol 267214
QX_complex_roots 296313
_gen_zero 325949
fix_roots1 398787
conformal_mapping 468773
split_1 468774
split_0_1 469144
split_0_2 469144
logradius 494918
split_2 494919
update_radius 494920
parameters 494921
optimize_split 494923
split_fromU 494923
split_0 495293
refine_F 503309
dft 503316
all_roots 536368
clean_roots 536415
fix_roots 537467
a_posteriori_errors 537468
mygprec_special 537476
logpre_modulus 608208
logmodulus 608212
abs_update_r 780142
ind_maxlog2 904341
isexactscalar 934017
isreal 963695
initdft 998237
dual_modulus 1014471
usp 1126055
ZX_sturmpart 1128191
check_ab 1178817
tocomplex 1215871
isvalidcoeff 1230445
ZX_Uspensky 1313780
conformal_basecase 1406436
conformal_pol 1406551
fujiwara_bound_real 1406862
split_complete 1528056
homothetie 1613545
append_clone 1616155
logmin_modulus 1617640
root_error 1914420
mygprecrc_special 2181405
ZX_rescale2prim 2233817
cmp_complex_appr 2241474
fujiwara_bound 2271894
checkbound 2354764
refine_H 2464551
scalepol 4297337
mygprec_absolute 4344138
_mp_mul 4374428
logmax_modulus 4458496
splitpoleval 5234766
bkeval_single_power 5234860
newton_polygon 5520702
X2XP1 5990530
_mp_sqr 6298120
dblexp 6562411
quicktofp 6981192
RgX_gtofp_bit 7047986
abs_update 8020738
mydbllogr 9565235
homothetie2n 9978792
_gen_nored 11200178
eval_rel_pol 13168243
fft 14193661
_gen_one 14468771
ZX_to_ZiX 16487432
pol_to_gaussint 17626667
_mp_add 24660497
_mp_cmul 34761345
myshiftrc 35575672
homothetie_gauss 36560106
lower_bound 41025959
findpower 41026539
graeffe 49597689
mydbllog2r 57609833
mygprec 63860800
ZiX_sqr 99215771
myshiftic 136075717
mygprecrc 215546514
mydbllog2i 226835529
dbllog2 303973645

Generated by: LCOV version 1.16