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 30702-bddb8d6928) Lines: 1336 1642 81.4 %
Date: 2026-02-23 02:23:56 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 24
lllgramkerim 30
lllkerim 30
kerint 33
lllgen 36
lllgramgen 36
lllgramkerimgen 36
lllkerimgen 36
qflllgram 54
kerint0 57
lllint 129
incrementalGSgen 144
lllallgen 144
lllgramallgen 144
REDgen 168
do_SWAPgen 168
qflllgram0 210
qflll0 258
pslg 432
ZM_flattergram 722
ZM_flattergram_rank 722
gramschmidt_upper 1080
RgM_Cholesky_dynprec 2227
flattergram_i 2227
ZM_to_RM 3234
fplll_heuristic 3234
gc_lll 3729
lllgram 7790
truncexpo 9666
ZC_to_RC 12165
dpeM_diagonal_shallow 17110
RgM_flip 26804
lllgramint 28979
lllall 29174
get_gaussred 35916
RgM_is_square_mat 36967
dpetor 78899
setG2_heuristic 149185
realsqrdotproduct 156614
setG_heuristic 163003
dpe_negz 192158
submulzu2n 219541
addmulzu2n 228597
Babai_heuristic 232085
dpe_addmuluz 267659
mulshift 308281
absrsmall2 320494
dpe_submuluz 322869
rotateG 342817
ZM_is_knapsack 495732
dperotate 501394
ZM_flatter_rank 508045
fplll_flatter 508767
ZM_flatter 509767
absrsmall 561301
lll_trivial 615630
dpe_muluz 628297
addmuliu642n 668454
u64toineg 668454
submuliu642n 684645
get_gramschmidt 900154
realdotproduct 955354
ZM_is_lower 988125
lll 1043762
affii_or_copy_gc 1089973
dpe_abssmall 1089973
drop 1100705
flat 1100705
potential 1100705
sizered 1100705
fplll_dpe 1324815
submulshift 1471860
dpe_addz 1572292
vectail_inplace 1721991
fplll_fast 1736260
lll_finish 1785142
dbldotsquare 2057984
gramschmidt_dynprec 2201410
affdbldpe 2649630
cget_dpemat 2649630
addmuliu2n 3238832
submuliu2n 3307376
mpabscmp 3366274
ZM_is_upper 3476900
addmulziu 3485541
Babai_dpe 3780073
GS_extraprec 3859899
condition_bound 3859899
ZM2_lll_norms 4048392
dpe_cmp 4240872
dpe_cmpmul 4240872
gsisinv 4247361
lllfp 4419454
submulziu 4503770
spread 4783802
ZM_lll_norms 5940372
nbits2prec64 6110993
cget_dblmat 6945040
pari_rint 8796783
rotateG_fast 9392369
addmuliu64_inplace 9572242
submuliu64_inplace 9623289
update_alpha 9735186
cget_dpevec 10962009
dpe_divz 11345497
dpe_abscmp 11726599
setG2_fast 13847830
addzi 14160156
subzi 14712787
affidpe 16801034
setG_fast 18475535
u64toi 19880176
set_line 20355746
affdpe 20584224
Babai_fast 24513976
rotate 25925824
dblrotate 28177107
cget_dblvec 28816124
dpe_normalize 39259531
dpe_submulz 41947471
dpe_subz 43589500
dpe_mulz 46188343
dpe_normalize0 88513866
dbldotproduct 95628377
itodbl_exp 132018179

Generated by: LCOV version 1.16