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 30835-e55edf4b45) Lines: 1467 1530 95.9 %
Date: 2026-04-26 09:26:37 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 8382
ZX_deg1root 15204
_sqrtnr 22597
polrootsbound_i 27097
polrootsbound 27104
RgX_normalize1 35705
ZX_realroots_irred 48575
realroots 50627
ZX_sturm_irred 116675
ZX_sturm_i 123070
split_pols 166702
polsolve 166710
splitcauchy 166713
solve_exact_pol 231509
cleanroots 231763
isexactpol 240117
roots_com 240117
roots_aux 240145
checkvalidpol 267228
QX_complex_roots 296301
_gen_zero 326011
fix_roots1 398796
conformal_mapping 468811
split_1 468813
split_0_1 469180
split_0_2 469180
logradius 494959
update_radius 494960
parameters 494961
split_2 494961
optimize_split 494963
split_fromU 494963
split_0 495333
refine_F 503355
dft 503362
all_roots 536384
clean_roots 536423
fix_roots 537475
a_posteriori_errors 537488
mygprec_special 537488
logpre_modulus 608272
logmodulus 608275
abs_update_r 780157
ind_maxlog2 904419
isexactscalar 934122
isreal 963774
initdft 998321
dual_modulus 1014567
usp 1126115
ZX_sturmpart 1128339
check_ab 1178966
tocomplex 1215969
isvalidcoeff 1230557
ZX_Uspensky 1313932
conformal_basecase 1406549
conformal_pol 1406668
fujiwara_bound_real 1407006
split_complete 1528146
homothetie 1613703
append_clone 1616242
logmin_modulus 1617792
root_error 1914483
mygprecrc_special 2181500
ZX_rescale2prim 2233883
cmp_complex_appr 2241647
fujiwara_bound 2272904
checkbound 2355060
refine_H 2464710
scalepol 4297668
mygprec_absolute 4344373
_mp_mul 4374538
logmax_modulus 4458851
splitpoleval 5235492
bkeval_single_power 5235570
newton_polygon 5521231
X2XP1 5990751
_mp_sqr 6298384
dblexp 6563019
quicktofp 6984351
RgX_gtofp_bit 7048665
abs_update 8021882
mydbllogr 9566646
homothetie2n 9979705
_gen_nored 11200607
eval_rel_pol 13169594
fft 14196331
_gen_one 14472519
ZX_to_ZiX 16494633
pol_to_gaussint 17628462
_mp_add 24660686
_mp_cmul 34763217
myshiftrc 35579050
homothetie_gauss 36563027
lower_bound 41029554
findpower 41030494
graeffe 49602884
mydbllog2r 57619076
mygprec 63865469
ZiX_sqr 99229843
myshiftic 136062396
mygprecrc 215583601
mydbllog2i 226763548
dbllog2 303906504

Generated by: LCOV version 1.16