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 30838-aa3635ec72) Lines: 1467 1530 95.9 %
Date: 2026-04-27 09:26:59 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 15203
_sqrtnr 22596
polrootsbound_i 27095
polrootsbound 27102
RgX_normalize1 35703
ZX_realroots_irred 48573
realroots 50627
ZX_sturm_irred 116678
ZX_sturm_i 123073
split_pols 166698
polsolve 166699
splitcauchy 166710
solve_exact_pol 231509
cleanroots 231763
isexactpol 240117
roots_com 240117
roots_aux 240145
checkvalidpol 267226
QX_complex_roots 296306
_gen_zero 326012
fix_roots1 398802
split_1 468810
conformal_mapping 468811
split_0_1 469172
split_0_2 469176
logradius 494960
parameters 494962
update_radius 494962
split_2 494963
split_fromU 494963
optimize_split 494964
split_0 495335
refine_F 503356
dft 503364
all_roots 536377
clean_roots 536426
fix_roots 537478
a_posteriori_errors 537479
mygprec_special 537483
logmodulus 608278
logpre_modulus 608283
abs_update_r 780197
ind_maxlog2 904395
isexactscalar 934122
isreal 963773
initdft 998327
dual_modulus 1014552
usp 1126138
ZX_sturmpart 1128327
check_ab 1178954
tocomplex 1215968
isvalidcoeff 1230551
ZX_Uspensky 1313928
conformal_basecase 1406551
conformal_pol 1406671
fujiwara_bound_real 1407000
split_complete 1528144
homothetie 1613699
append_clone 1616255
logmin_modulus 1617794
root_error 1914503
mygprecrc_special 2181505
ZX_rescale2prim 2234039
cmp_complex_appr 2241641
fujiwara_bound 2272888
checkbound 2355036
refine_H 2464699
scalepol 4297660
mygprec_absolute 4344378
_mp_mul 4374467
logmax_modulus 4458863
bkeval_single_power 5235382
splitpoleval 5235431
newton_polygon 5521300
X2XP1 5991069
_mp_sqr 6298495
dblexp 6563056
quicktofp 6984509
RgX_gtofp_bit 7048733
abs_update 8021315
mydbllogr 9566105
homothetie2n 9979737
_gen_nored 11199763
eval_rel_pol 13169568
fft 14196162
_gen_one 14472290
ZX_to_ZiX 16490156
pol_to_gaussint 17628390
_mp_add 24660387
_mp_cmul 34760525
myshiftrc 35580161
homothetie_gauss 36563637
lower_bound 41030642
findpower 41032040
graeffe 49602362
mydbllog2r 57619077
mygprec 63866092
ZiX_sqr 99231594
myshiftic 136050851
mygprecrc 215577677
mydbllog2i 226764295
dbllog2 303897445

Generated by: LCOV version 1.16