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.18.1 lcov report (development 31042-0fbe168e69) Lines: 81.3 % 1643 1335
Test Date: 2026-07-23 17:04:59 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
RgM_flop 0
dbg_flatter 0
dbg_flattergram 0
fplll 0
kerint 28
matkerint0 28
lllgramkerim 35
lllkerim 35
lllgen 42
lllgramgen 42
lllgramkerimgen 42
lllkerimgen 42
kerint0 56
qflllgram 63
incrementalGSgen 168
lllallgen 168
lllgramallgen 168
lllint 183
REDgen 196
do_SWAPgen 196
qflllgram0 245
qflll0 301
pslg 504
ZM_flattergram 968
ZM_flattergram_rank 968
gramschmidt_upper 1402
dpeM_diagonal_shallow 1694
RgM_Cholesky_dynprec 2988
flattergram_i 2988
ZM_to_RM 4692
fplll_heuristic 4692
gc_lll 5446
lllgram 9089
ZC_to_RC 22240
truncexpo 24411
dpetor 25844
RgM_flip 34939
lllgramint 36439
lllall 36699
get_cholesky 44546
RgM_is_square_mat 45828
thsn 92851
setG2_heuristic 194933
realsqrdotproduct 207602
setG_heuristic 217683
Babai_heuristic 301906
dpe_negz 366301
absrsmall2 441842
rotateG 478734
ZM_is_knapsack 607647
ZM_flatter_rank 625255
fplll_flatter 626223
ZM_flatter 627269
dperotate 716308
addmuliu642n 726330
u64toineg 726330
submuliu642n 744684
absrsmall 761350
lll_trivial 771847
mulshift 933199
thre 1033915
get_gramschmidt 1099663
ZM_is_lower 1205580
lll 1244994
realdotproduct 1288707
dpe_addmuluz 1323853
drop 1347830
flat 1347830
potential 1347830
sizered 1347830
dpe_submuluz 1410109
fplll_dpe 1605219
submulshift 2066712
vectail_inplace 2093562
fplll_fast 2107542
affii_or_copy_gc 2162095
dpe_abssmall 2162095
lll_finish 2168181
dbldotsquare 2485309
gramschmidt_dynprec 2695660
affdbldpe 3210438
cget_dpemat 3210438
mpabscmp 4109269
ZM_is_upper 4239602
addmuliu2n 4642157
submuliu2n 4718260
GS_extraprec 4729266
condition_bound 4729266
Babai_dpe 4762323
ZM2_lll_norms 4851314
lllfp 5375739
dpe_cmp 5469801
dpe_cmpmul 5469801
spread 5856032
dpe_addz 6613235
ZM_lll_norms 7144245
nbits2prec64 7496565
cget_dblmat 8430168
dpe_muluz 8621596
addmuliu64_inplace 10599145
submuliu64_inplace 10652343
addmulziu 10701531
pari_rint 11638556
rotateG_fast 11957876
submulziu 12094839
update_alpha 12436610
cget_dpevec 13316637
dpe_divz 15577747
dpe_abscmp 15746499
submulzu2n 16768355
addmulzu2n 16967395
setG2_fast 17608495
u64toi 21996172
affidpe 22363572
setG_fast 23262321
set_line 25542035
Babai_fast 31670503
addzi 32045830
subzi 32809395
affdpe 33062959
rotate 33251056
cget_dblvec 35109252
dblrotate 35873628
dpe_submulz 69115457
dpe_mulz 74585258
dpe_subz 75767142
dpe_normalize 76719052
dbldotproduct 129123782
dpe_normalize0 151968279
itodbl_exp 176918914

Generated by: LCOV version 2.0-1