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 30831-19b50a36d0) Lines: 1467 1530 95.9 %
Date: 2026-04-22 09:25:48 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 22594
polrootsbound_i 27095
polrootsbound 27102
RgX_normalize1 35703
ZX_realroots_irred 48571
realroots 50627
ZX_sturm_irred 116668
ZX_sturm_i 123063
split_pols 166697
polsolve 166699
splitcauchy 166706
solve_exact_pol 231509
cleanroots 231763
isexactpol 240117
roots_com 240117
roots_aux 240145
checkvalidpol 267226
QX_complex_roots 296313
_gen_zero 325893
fix_roots1 398808
conformal_mapping 468809
split_1 468810
split_0_1 469180
split_0_2 469181
logradius 494963
split_2 494963
parameters 494966
update_radius 494966
optimize_split 494967
split_fromU 494967
split_0 495335
refine_F 503364
dft 503366
all_roots 536383
clean_roots 536430
fix_roots 537487
a_posteriori_errors 537490
mygprec_special 537491
logpre_modulus 608286
logmodulus 608292
abs_update_r 780222
ind_maxlog2 904414
isexactscalar 934122
isreal 963777
initdft 998332
dual_modulus 1014573
usp 1126113
ZX_sturmpart 1128311
check_ab 1178938
tocomplex 1215984
isvalidcoeff 1230551
ZX_Uspensky 1313905
conformal_basecase 1406550
conformal_pol 1406670
fujiwara_bound_real 1406977
split_complete 1528145
homothetie 1613725
append_clone 1616264
logmin_modulus 1617765
root_error 1914522
mygprecrc_special 2181524
ZX_rescale2prim 2233883
cmp_complex_appr 2241680
fujiwara_bound 2272871
checkbound 2355003
refine_H 2464716
scalepol 4297668
mygprec_absolute 4344369
_mp_mul 4374556
logmax_modulus 4458791
bkeval_single_power 5234649
splitpoleval 5234815
newton_polygon 5521326
X2XP1 5990783
_mp_sqr 6298253
dblexp 6563054
quicktofp 6984421
RgX_gtofp_bit 7048823
abs_update 8021532
mydbllogr 9566212
homothetie2n 9979808
_gen_nored 11200891
eval_rel_pol 13169765
fft 14196551
_gen_one 14469495
ZX_to_ZiX 16489847
pol_to_gaussint 17628514
_mp_add 24661434
_mp_cmul 34763739
myshiftrc 35579404
homothetie_gauss 36563253
findpower 41028145
lower_bound 41028434
graeffe 49604443
mydbllog2r 57618018
mygprec 63865380
ZiX_sqr 99219087
myshiftic 136092592
mygprecrc 215563950
mydbllog2i 226771163
dbllog2 303917364

Generated by: LCOV version 1.16