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) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30622-caa25a75db) Lines: 1336 1642 81.4 %
Date: 2026-01-22 09:18:00 Functions: 125 130 96.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Babai 0
RgM_flop 0
dbg_flatter 0
dbg_flattergram 0
fplll 0
matkerint0 28
lllgramkerim 35
lllkerim 35
kerint 42
lllgen 42
lllgramgen 42
lllgramkerimgen 42
lllkerimgen 42
qflllgram 63
kerint0 70
incrementalGSgen 168
lllallgen 168
lllgramallgen 168
lllint 183
REDgen 196
do_SWAPgen 196
qflllgram0 245
qflll0 301
pslg 504
ZM_flattergram 961
ZM_flattergram_rank 961
gramschmidt_upper 1297
RgM_Cholesky_dynprec 2967
flattergram_i 2967
ZM_to_RM 4203
fplll_heuristic 4203
gc_lll 4788
lllgram 9089
truncexpo 11689
ZC_to_RC 15667
dpeM_diagonal_shallow 18805
RgM_flip 33835
lllgramint 36439
lllall 36699
get_gaussred 43383
RgM_is_square_mat 45828
dpetor 88830
setG2_heuristic 184876
realsqrdotproduct 194500
setG_heuristic 202523
dpe_negz 237024
submulzu2n 254838
addmulzu2n 264432
Babai_heuristic 283357
mulshift 314810
dpe_addmuluz 339677
absrsmall2 392314
dpe_submuluz 407824
rotateG 439064
ZM_is_knapsack 579506
ZM_flatter_rank 617081
fplll_flatter 618042
ZM_flatter 619089
dperotate 647358
addmuliu642n 668454
u64toineg 668454
absrsmall 676576
submuliu642n 684645
lll_trivial 748279
dpe_muluz 791934
get_gramschmidt 1067376
realdotproduct 1150317
ZM_is_lower 1175530
lll 1226643
drop 1331872
flat 1331872
potential 1331872
sizered 1331872
affii_or_copy_gc 1374958
dpe_abssmall 1374967
submulshift 1494143
fplll_dpe 1538105
dpe_addz 1928809
vectail_inplace 2005726
fplll_fast 2014676
lll_finish 2073417
dbldotsquare 2356742
gramschmidt_dynprec 2663743
affdbldpe 3076207
cget_dpemat 3076212
addmuliu2n 3842727
submuliu2n 3932869
mpabscmp 4027920
ZM_is_upper 4142524
Babai_dpe 4523538
addmulziu 4554474
GS_extraprec 4691627
condition_bound 4691627
ZM2_lll_norms 4809620
dpe_cmpmul 5133951
dpe_cmp 5133954
gsisinv 5135697
lllfp 5302548
spread 5764900
submulziu 5880229
ZM_lll_norms 6995705
nbits2prec64 7394547
cget_dblmat 8058703
addmuliu64_inplace 9572242
submuliu64_inplace 9623289
pari_rint 10455453
rotateG_fast 11118273
update_alpha 11557341
cget_dpevec 12779882
dpe_divz 13754379
dpe_abscmp 14194216
setG2_fast 16403116
addzi 17675633
subzi 18409608
u64toi 19880176
affidpe 20198511
setG_fast 21816940
set_line 23981871
affdpe 25242428
Babai_fast 29119335
rotate 30892061
dblrotate 33354826
cget_dblvec 33560113
dpe_normalize 47272703
dpe_submulz 50861593
dpe_subz 52877156
dpe_mulz 55995514
dpe_normalize0 106608023
dbldotproduct 114485072
itodbl_exp 157239065

Generated by: LCOV version 1.16