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

Generated by: LCOV version 1.16