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 31041-bd73e9fcdd) Lines: 81.3 % 1643 1335
Test Date: 2026-07-22 22:45:42 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 44545
RgM_is_square_mat 45828
thsn 92852
setG2_heuristic 194933
realsqrdotproduct 207602
setG_heuristic 217683
Babai_heuristic 301906
dpe_negz 366289
absrsmall2 441842
rotateG 478734
ZM_is_knapsack 607635
ZM_flatter_rank 625237
fplll_flatter 626205
ZM_flatter 627251
dperotate 716308
addmuliu642n 726330
u64toineg 726330
submuliu642n 744684
absrsmall 761350
lll_trivial 771840
mulshift 933199
thre 1033896
get_gramschmidt 1099639
ZM_is_lower 1205554
lll 1244992
realdotproduct 1288707
dpe_addmuluz 1323853
drop 1347794
sizered 1347794
flat 1347795
potential 1347795
dpe_submuluz 1410109
fplll_dpe 1605192
submulshift 2066712
vectail_inplace 2093502
fplll_fast 2107497
affii_or_copy_gc 2162070
dpe_abssmall 2162072
lll_finish 2168120
dbldotsquare 2485132
gramschmidt_dynprec 2695589
cget_dpemat 3210382
affdbldpe 3210383
mpabscmp 4109277
ZM_is_upper 4239494
addmuliu2n 4636975
submuliu2n 4711408
GS_extraprec 4729081
condition_bound 4729081
Babai_dpe 4762189
ZM2_lll_norms 4851232
lllfp 5375618
dpe_cmp 5469665
dpe_cmpmul 5469665
spread 5855819
dpe_addz 6613218
ZM_lll_norms 7144011
nbits2prec64 7496370
cget_dblmat 8429967
dpe_muluz 8621596
addmuliu64_inplace 10599145
submuliu64_inplace 10652343
addmulziu 10701477
pari_rint 11638271
rotateG_fast 11957553
submulziu 12094680
update_alpha 12436436
cget_dpevec 13316045
dpe_divz 15577366
dpe_abscmp 15746224
submulzu2n 16768355
addmulzu2n 16967395
setG2_fast 17608335
u64toi 21996172
affidpe 22362641
setG_fast 23261701
set_line 25539291
Babai_fast 31669935
addzi 32044909
subzi 32808453
affdpe 33062178
rotate 33250277
cget_dblvec 35108348
dblrotate 35872665
dpe_submulz 69114543
dpe_mulz 74584047
dpe_subz 75766161
dpe_normalize 76718505
dbldotproduct 129115991
dpe_normalize0 151965959
itodbl_exp 176821030

Generated by: LCOV version 2.0-1