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 30809-023acc7158) Lines: 1467 1530 95.9 %
Date: 2026-04-13 09:26:12 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 15204
_sqrtnr 22597
polrootsbound_i 27097
polrootsbound 27104
RgX_normalize1 35705
ZX_realroots_irred 48574
realroots 50627
ZX_sturm_irred 116677
ZX_sturm_i 123072
polsolve 166703
split_pols 166705
splitcauchy 166711
solve_exact_pol 231495
cleanroots 231763
isexactpol 240103
roots_com 240103
roots_aux 240131
checkvalidpol 267214
QX_complex_roots 296306
_gen_zero 326011
fix_roots1 398789
conformal_mapping 468773
split_1 468776
split_0_1 469145
split_0_2 469145
logradius 494918
update_radius 494919
parameters 494920
optimize_split 494921
split_2 494921
split_fromU 494921
split_0 495293
refine_F 503316
dft 503318
all_roots 536363
clean_roots 536410
a_posteriori_errors 537466
fix_roots 537467
mygprec_special 537469
logpre_modulus 608222
logmodulus 608224
abs_update_r 780151
ind_maxlog2 904320
isexactscalar 934017
isreal 963696
initdft 998238
dual_modulus 1014469
usp 1126132
ZX_sturmpart 1128314
check_ab 1178941
tocomplex 1215863
isvalidcoeff 1230445
ZX_Uspensky 1313916
conformal_basecase 1406441
conformal_pol 1406560
fujiwara_bound_real 1406993
split_complete 1528047
homothetie 1613554
append_clone 1616158
logmin_modulus 1617654
root_error 1914397
mygprecrc_special 2181403
ZX_rescale2prim 2233944
cmp_complex_appr 2241515
fujiwara_bound 2272867
checkbound 2355012
refine_H 2464549
scalepol 4297326
mygprec_absolute 4344134
_mp_mul 4374506
logmax_modulus 4458511
bkeval_single_power 5235138
splitpoleval 5235366
newton_polygon 5520794
X2XP1 5990904
_mp_sqr 6298441
dblexp 6562479
quicktofp 6984367
RgX_gtofp_bit 7048129
abs_update 8020828
mydbllogr 9565428
homothetie2n 9978852
_gen_nored 11201618
eval_rel_pol 13168315
fft 14194480
_gen_one 14471953
ZX_to_ZiX 16486312
pol_to_gaussint 17626798
_mp_add 24661394
_mp_cmul 34765053
myshiftrc 35576416
homothetie_gauss 36560852
lower_bound 41025975
findpower 41027220
graeffe 49598576
mydbllog2r 57612204
mygprec 63860337
ZiX_sqr 99219656
myshiftic 136064475
mygprecrc 215549364
mydbllog2i 226751452
dbllog2 303886986

Generated by: LCOV version 1.16