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 - lll.c (source / functions) Coverage Total Hit
Test: PARI/GP v2.19.0 lcov report (development 31092-e6893b0017) Lines: 81.2 % 1645 1336
Test Date: 2026-09-21 17:02:41 Functions: 96.2 % 131 126
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
Babai 0
Babai_dpe 4767765
Babai_fast 31682025
Babai_heuristic 302144
GS_extraprec 4729033
REDgen 196
RgM_Cholesky_dynprec 2988
RgM_flip 34953
RgM_flop 0
RgM_is_square_mat 45834
ZC_to_RC 22443
ZM2_lll_norms 4851107
ZM_flatter 627255
ZM_flatter_rank 625241
ZM_flattergram 968
ZM_flattergram_rank 968
ZM_is_knapsack 607678
ZM_is_lower 1205606
ZM_is_upper 4239521
ZM_lll_norms 7144103
ZM_to_RM 4706
absrsmall 761889
absrsmall2 442325
addmuliu2n 4663838
addmuliu642n 729530
addmuliu64_inplace 10613593
addmulziu 10826608
addmulzu2n 17070592
addzi 32506340
affdbldpe 3210510
affdpe 33168563
affidpe 22440573
affii_or_copy_gc 2183624
cget_dblmat 8430424
cget_dblvec 35113056
cget_dpemat 3210510
cget_dpevec 13317897
condition_bound 4729033
dbg_flatter 0
dbg_flattergram 0
dbldotproduct 129221024
dbldotsquare 2485221
dblrotate 35883033
do_SWAPgen 196
dpeM_diagonal_shallow 1736
dpe_abscmp 15813090
dpe_abssmall 2183624
dpe_addmuluz 1345057
dpe_addz 6685227
dpe_cmp 5479855
dpe_cmpmul 5479855
dpe_divz 15649415
dpe_muluz 8704419
dpe_mulz 75176635
dpe_negz 366751
dpe_normalize 77496104
dpe_normalize0 153385645
dpe_submuluz 1433659
dpe_submulz 69696780
dpe_subz 76422585
dperotate 718524
dpetor 26670
drop 1347772
flat 1347772
flattergram_i 2988
fplll 0
fplll_dpe 1605255
fplll_fast 2107606
fplll_flatter 626209
fplll_heuristic 4706
gc_lll 5460
get_cholesky 44547
get_gramschmidt 1099641
gramschmidt_dynprec 2695544
gramschmidt_upper 1402
incrementalGSgen 168
itodbl_exp 177088231
kerint 28
kerint0 56
lll 1244995
lll_finish 2168246
lll_trivial 771851
lllall 36701
lllallgen 168
lllfp 5375570
lllgen 42
lllgram 9093
lllgramallgen 168
lllgramgen 42
lllgramint 36441
lllgramkerim 35
lllgramkerimgen 42
lllint 183
lllkerim 35
lllkerimgen 42
matkerint0 28
mpabscmp 4109258
mulshift 938305
nbits2prec64 7496272
pari_rint 11657987
potential 1347772
pslg 504
qflll0 301
qflllgram 63
qflllgram0 245
realdotproduct 1289785
realsqrdotproduct 207826
rotate 33259194
rotateG 479947
rotateG_fast 11961011
setG2_fast 17615472
setG2_heuristic 195115
setG_fast 23270158
setG_heuristic 217970
set_line 25550093
sizered 1347772
spread 5855823
submuliu2n 4738151
submuliu642n 747684
submuliu64_inplace 10666126
submulshift 2074362
submulziu 12229399
submulzu2n 16867897
subzi 33271522
thre 1033919
thsn 92871
truncexpo 24469
u64toi 22027403
u64toineg 729530
update_alpha 12440958
vectail_inplace 2093627

Generated by: LCOV version 2.0-1