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-09-03 17:02:47 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 297207
RgX_Graeffe 14
RgX_gtofp_bit 7056053
RgX_normalize1 36406
X2XP1 6001203
ZX_Uspensky 1315135
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15275
ZX_graeffe 5460
ZX_realroots_irred 48670
ZX_rescale2prim 2237741
ZX_sturm 6395
ZX_sturm_i 123562
ZX_sturm_irred 117167
ZX_sturmpart 1129034
ZX_to_ZiX 16456844
ZiX_sqr 99348820
_gen_nored 11268048
_gen_one 14524760
_gen_zero 326083
_intervalcmp 0
_mp_add 24942127
_mp_cmul 35116850
_mp_mul 4430508
_mp_sqr 6349893
_mp_sub 0
_sqrtnr 22878
a_posteriori_errors 538495
abs_update 8028244
abs_update_r 781152
all_roots 537394
append_clone 1618805
bkeval_single_power 5250403
check_ab 1179665
checkbound 2356460
checkvalidpol 268041
clean_roots 537436
cleanroots 231875
cmp_complex_appr 2249818
conformal_basecase 1407548
conformal_mapping 469143
conformal_pol 1407667
dblexp 6569461
dbllog2 304785587
dft 503715
dual_modulus 1015233
eval_rel_pol 13181397
fft 14225456
fft2 7462
findpower 41064576
fix_roots 538495
fix_roots1 398949
fujiwara_bound 2276743
fujiwara_bound_real 1408244
graeffe 49674410
homothetie 1614931
homothetie2n 9987840
homothetie_gauss 36603376
ind_maxlog2 904870
initdft 998987
isexactpol 240229
isexactscalar 934563
isreal 964415
isvalidcoeff 1235239
logmax_modulus 4461200
logmin_modulus 1618165
logmodulus 608826
logpre_modulus 608826
logradius 495272
lower_bound 41064576
mydbllog2i 227088948
mydbllog2r 58109279
mydbllogr 9573940
mygprec 63982351
mygprec_absolute 4356137
mygprec_special 538495
mygprecrc 215748464
mygprecrc_special 2185070
myshiftic 136515271
myshiftrc 35616716
newton_polygon 5526640
optimize_split 495272
parameters 495272
pol_to_gaussint 17642597
polgraeffe 0
polgraeffe0 14
polmod_to_embed 84
polrootsbound 27805
polrootsbound_i 27798
polsolve 166990
quicktofp 6999999
realroots 50631
refine_F 503715
refine_H 2466399
root_error 1919273
roots 8382
roots_aux 240257
roots_com 240229
rootsdeg0 42
scalepol 4300674
scalepol2n 0
sol_ok 3378
solve_exact_pol 231621
split_0 495644
split_0_1 469515
split_0_2 469515
split_1 469143
split_2 495272
split_complete 1529783
split_fromU 495272
split_pols 166990
splitcauchy 166990
splitpoleval 5250403
tocomplex 1219391
update_radius 495272
usp 1127933

Generated by: LCOV version 2.0-1