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 30802-b11b770002) Lines: 1467 1530 95.9 %
Date: 2026-04-11 09:26:21 Functions: 116 119 97.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_intervalcmp 0
_mp_sub 0
scalepol2n 0
ZX_Uspensky_equal_yes 14
polgraeffe 14
ZX_Uspensky_no 21
ZX_Uspensky_equal 28
rootsdeg0 42
FFT 56
FFTinv 56
polmod_to_embed 84
FFT_i 98
sol_ok 3378
ZX_graeffe 5439
ZX_sturm 6395
fft2 7462
roots 8368
ZX_deg1root 15201
_sqrtnr 22592
polrootsbound_i 27097
polrootsbound 27104
RgX_normalize1 35705
ZX_realroots_irred 48567
realroots 50627
ZX_sturm_irred 116671
ZX_sturm_i 123066
polsolve 166703
split_pols 166703
splitcauchy 166710
solve_exact_pol 231495
cleanroots 231763
isexactpol 240103
roots_com 240103
roots_aux 240131
checkvalidpol 267214
QX_complex_roots 296307
_gen_zero 325980
fix_roots1 398789
split_1 468783
conformal_mapping 468785
split_0_1 469155
split_0_2 469155
logradius 494931
optimize_split 494935
split_2 494935
parameters 494936
split_fromU 494936
update_radius 494936
split_0 495308
refine_F 503325
dft 503328
all_roots 536368
clean_roots 536408
fix_roots 537469
a_posteriori_errors 537470
mygprec_special 537475
logmodulus 608221
logpre_modulus 608223
abs_update_r 780135
ind_maxlog2 904367
isexactscalar 934017
isreal 963719
initdft 998262
dual_modulus 1014493
usp 1126040
ZX_sturmpart 1128221
check_ab 1178789
tocomplex 1215871
isvalidcoeff 1230445
ZX_Uspensky 1313821
conformal_basecase 1406474
conformal_pol 1406593
fujiwara_bound_real 1406889
split_complete 1528086
homothetie 1613582
append_clone 1616173
logmin_modulus 1617740
root_error 1914391
mygprecrc_special 2181419
ZX_rescale2prim 2233759
cmp_complex_appr 2241481
fujiwara_bound 2271929
checkbound 2354828
refine_H 2464615
scalepol 4297436
mygprec_absolute 4344162
_mp_mul 4374504
logmax_modulus 4458718
bkeval_single_power 5235346
splitpoleval 5235592
newton_polygon 5520748
X2XP1 5990499
_mp_sqr 6298308
dblexp 6562568
quicktofp 6981194
RgX_gtofp_bit 7048110
abs_update 8020970
mydbllogr 9565365
homothetie2n 9979116
_gen_nored 11199443
eval_rel_pol 13168602
fft 14194561
_gen_one 14471745
ZX_to_ZiX 16492280
pol_to_gaussint 17627290
_mp_add 24661823
_mp_cmul 34760006
myshiftrc 35577443
homothetie_gauss 36563354
lower_bound 41030817
findpower 41030929
graeffe 49604356
mydbllog2r 57612533
mygprec 63862483
ZiX_sqr 99226901
myshiftic 136080442
mygprecrc 215565823
mydbllog2i 226862228
dbllog2 304008948

Generated by: LCOV version 1.16