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

Generated by: LCOV version 1.16