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 30764-6b81f1f3fa) Lines: 1467 1530 95.9 %
Date: 2026-03-25 09:26:52 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 296311
RgX_gtofp_bit 7048107
RgX_normalize1 35705
X2XP1 5990901
ZX_Uspensky 1313908
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15204
ZX_graeffe 5439
ZX_realroots_irred 48574
ZX_rescale2prim 2233919
ZX_sturm 6395
ZX_sturm_i 123072
ZX_sturm_irred 116677
ZX_sturmpart 1128303
ZX_to_ZiX 16490321
ZiX_sqr 99233582
_gen_nored 11210798
_gen_one 14476798
_gen_zero 326024
_intervalcmp 0
_mp_add 24665647
_mp_cmul 34785283
_mp_mul 4374663
_mp_sqr 6298839
_mp_sub 0
_sqrtnr 22598
a_posteriori_errors 537467
abs_update 8020766
abs_update_r 780149
all_roots 536367
append_clone 1616173
bkeval_single_power 5236515
check_ab 1178930
checkbound 2354990
checkvalidpol 267214
clean_roots 536414
cleanroots 231763
cmp_complex_appr 2241503
conformal_basecase 1406467
conformal_mapping 468784
conformal_pol 1406586
dblexp 6562611
dbllog2 304079526
dft 503325
dual_modulus 1014480
eval_rel_pol 13168421
fft 14193998
fft2 7462
findpower 41031600
fix_roots 537469
fix_roots1 398789
fujiwara_bound 2272011
fujiwara_bound_real 1406972
graeffe 49608297
homothetie 1613568
homothetie2n 9979199
homothetie_gauss 36565395
ind_maxlog2 904327
initdft 998260
isexactpol 240103
isexactscalar 934017
isreal 963716
isvalidcoeff 1230445
logmax_modulus 4458689
logmin_modulus 1617702
logmodulus 608228
logpre_modulus 608226
logradius 494928
lower_bound 41031689
mydbllog2i 226904404
mydbllog2r 57613368
mydbllogr 9565124
mygprec 63864953
mygprec_absolute 4344233
mygprec_special 537475
mygprecrc 215571416
mygprecrc_special 2181410
myshiftic 136145942
myshiftrc 35578220
newton_polygon 5520813
optimize_split 494934
parameters 494934
pol_to_gaussint 17627234
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166712
quicktofp 6981463
realroots 50627
refine_F 503322
refine_H 2464594
root_error 1914415
roots 8368
roots_aux 240131
roots_com 240103
rootsdeg0 42
scalepol 4297406
scalepol2n 0
sol_ok 3378
solve_exact_pol 231495
split_0 495295
split_0_1 469154
split_0_2 469154
split_1 468784
split_2 494933
split_complete 1528080
split_fromU 494934
split_pols 166706
splitcauchy 166714
splitpoleval 5236688
tocomplex 1215883
update_radius 494933
usp 1126098

Generated by: LCOV version 1.16