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-08-12 17:02:34 Functions: 96.7 % 121 117
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
FFT 56
FFT_i 98
FFTinv 56
QX_complex_roots 297218
RgX_Graeffe 14
RgX_gtofp_bit 7056167
RgX_normalize1 36406
X2XP1 6001240
ZX_Uspensky 1315170
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15274
ZX_graeffe 5460
ZX_realroots_irred 48668
ZX_rescale2prim 2237750
ZX_sturm 6395
ZX_sturm_i 123562
ZX_sturm_irred 117167
ZX_sturmpart 1129070
ZX_to_ZiX 16458564
ZiX_sqr 99353142
_gen_nored 11267916
_gen_one 14524586
_gen_zero 326083
_intervalcmp 0
_mp_add 24942085
_mp_cmul 35116676
_mp_mul 4430508
_mp_sqr 6349851
_mp_sub 0
_sqrtnr 22877
a_posteriori_errors 538506
abs_update 8028428
abs_update_r 781170
all_roots 537405
append_clone 1618834
bkeval_single_power 5250337
check_ab 1179701
checkbound 2356532
checkvalidpol 268041
clean_roots 537447
cleanroots 231875
cmp_complex_appr 2249834
conformal_basecase 1407596
conformal_mapping 469159
conformal_pol 1407715
dblexp 6569676
dbllog2 304805056
dft 503731
dual_modulus 1015266
eval_rel_pol 13181730
fft 14226082
fft2 7462
findpower 41066629
fix_roots 538506
fix_roots1 398955
fujiwara_bound 2276797
fujiwara_bound_real 1408278
graeffe 49676571
homothetie 1614973
homothetie2n 9988143
homothetie_gauss 36605206
ind_maxlog2 904901
initdft 999022
isexactpol 240229
isexactscalar 934563
isreal 964450
isvalidcoeff 1235239
logmax_modulus 4461423
logmin_modulus 1618263
logmodulus 608838
logpre_modulus 608838
logradius 495291
lower_bound 41066629
mydbllog2i 227102473
mydbllog2r 58111631
mydbllogr 9574159
mygprec 63984534
mygprec_absolute 4356249
mygprec_special 538506
mygprecrc 215759002
mygprecrc_special 2185110
myshiftic 136522990
myshiftrc 35618226
newton_polygon 5526720
optimize_split 495291
parameters 495291
pol_to_gaussint 17643153
polgraeffe 0
polgraeffe0 14
polmod_to_embed 84
polrootsbound 27805
polrootsbound_i 27798
polsolve 166988
quicktofp 7000166
realroots 50631
refine_F 503731
refine_H 2466499
root_error 1919309
roots 8382
roots_aux 240257
roots_com 240229
rootsdeg0 42
scalepol 4300827
scalepol2n 0
sol_ok 3378
solve_exact_pol 231621
split_0 495663
split_0_1 469531
split_0_2 469531
split_1 469159
split_2 495291
split_complete 1529832
split_fromU 495291
split_pols 166988
splitcauchy 166988
splitpoleval 5250337
tocomplex 1219427
update_radius 495291
usp 1127952

Generated by: LCOV version 2.0-1