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 31053-95e3b72995) Lines: 94.1 % 1561 1469
Test Date: 2026-07-24 17:03:07 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 297211
RgX_Graeffe 14
RgX_gtofp_bit 7055948
RgX_normalize1 36406
X2XP1 6001222
ZX_Uspensky 1315158
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 2237764
ZX_sturm 6395
ZX_sturm_i 123562
ZX_sturm_irred 117167
ZX_sturmpart 1129062
ZX_to_ZiX 16456983
ZiX_sqr 99347600
_gen_nored 11267310
_gen_one 14523829
_gen_zero 326093
_intervalcmp 0
_mp_add 24940824
_mp_cmul 35114881
_mp_mul 4430341
_mp_sqr 6349466
_mp_sub 0
_sqrtnr 22877
a_posteriori_errors 538498
abs_update 8028364
abs_update_r 781140
all_roots 537398
append_clone 1618798
bkeval_single_power 5250075
check_ab 1179689
checkbound 2356508
checkvalidpol 268041
clean_roots 537440
cleanroots 231875
cmp_complex_appr 2249817
conformal_basecase 1407539
conformal_mapping 469140
conformal_pol 1407658
dblexp 6569354
dbllog2 304779911
dft 503707
dual_modulus 1015232
eval_rel_pol 13181285
fft 14225289
fft2 7462
findpower 41064012
fix_roots 538498
fix_roots1 398950
fujiwara_bound 2276778
fujiwara_bound_real 1408270
graeffe 49673800
homothetie 1614920
homothetie2n 9987700
homothetie_gauss 36602869
ind_maxlog2 904878
initdft 998975
isexactpol 240229
isexactscalar 934563
isreal 964408
isvalidcoeff 1235239
logmax_modulus 4461143
logmin_modulus 1618151
logmodulus 608815
logpre_modulus 608815
logradius 495268
lower_bound 41064012
mydbllog2i 227083849
mydbllog2r 58108454
mydbllogr 9574045
mygprec 63975823
mygprec_absolute 4356161
mygprec_special 538498
mygprecrc 215731251
mygprecrc_special 2185066
myshiftic 136510203
myshiftrc 35615519
newton_polygon 5526557
optimize_split 495268
parameters 495268
pol_to_gaussint 17642428
polgraeffe 0
polgraeffe0 14
polmod_to_embed 84
polrootsbound 27805
polrootsbound_i 27798
polsolve 166980
quicktofp 7000077
realroots 50627
refine_F 503707
refine_H 2465974
root_error 1919273
roots 8382
roots_aux 240257
roots_com 240229
rootsdeg0 42
scalepol 4300644
scalepol2n 0
sol_ok 3378
solve_exact_pol 231621
split_0 495640
split_0_1 469512
split_0_2 469512
split_1 469140
split_2 495268
split_complete 1529778
split_fromU 495268
split_pols 166980
splitcauchy 166980
splitpoleval 5250075
tocomplex 1219401
update_radius 495268
usp 1127968

Generated by: LCOV version 2.0-1