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-11-12 17:03:01 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 1736
RgM_Cholesky_dynprec 2988
flattergram_i 2988
ZM_to_RM 4706
fplll_heuristic 4706
gc_lll 5460
lllgram 9093
ZC_to_RC 22443
truncexpo 24469
dpetor 26670
RgM_flip 34953
lllgramint 36441
lllall 36701
get_cholesky 44547
RgM_is_square_mat 45834
thsn 92871
setG2_heuristic 195115
realsqrdotproduct 207826
setG_heuristic 217970
Babai_heuristic 302144
dpe_negz 366747
absrsmall2 442325
rotateG 479947
ZM_is_knapsack 607831
ZM_flatter_rank 625251
fplll_flatter 626219
ZM_flatter 627265
dperotate 718524
addmuliu642n 729530
u64toineg 729530
submuliu642n 747684
absrsmall 761889
lll_trivial 771855
mulshift 938305
thre 1034072
get_gramschmidt 1099651
ZM_is_lower 1205616
lll 1244995
realdotproduct 1289785
dpe_addmuluz 1345057
drop 1347846
flat 1347846
potential 1347846
sizered 1347846
dpe_submuluz 1433659
fplll_dpe 1605261
submulshift 2074362
vectail_inplace 2093787
fplll_fast 2107766
lll_finish 2168406
affii_or_copy_gc 2183624
dpe_abssmall 2183624
dbldotsquare 2485327
gramschmidt_dynprec 2695692
affdbldpe 3210522
cget_dpemat 3210522
mpabscmp 4109778
ZM_is_upper 4239675
addmuliu2n 4668358
GS_extraprec 4729285
condition_bound 4729285
submuliu2n 4743455
Babai_dpe 4767867
ZM2_lll_norms 4851159
lllfp 5375792
dpe_cmp 5479957
dpe_cmpmul 5479957
spread 5856228
dpe_addz 6685227
ZM_lll_norms 7144315
nbits2prec64 7496646
cget_dblmat 8431064
dpe_muluz 8704419
addmuliu64_inplace 10613593
submuliu64_inplace 10666126
addmulziu 10826608
pari_rint 11659688
rotateG_fast 11963967
submulziu 12229399
update_alpha 12443914
cget_dpevec 13318011
dpe_divz 15650033
dpe_abscmp 15813708
submulzu2n 16867897
addmulzu2n 17070592
setG2_fast 17620049
u64toi 22027403
affidpe 22441245
setG_fast 23275410
set_line 25555541
Babai_fast 31689369
addzi 32506340
affdpe 33169127
rotate 33268067
subzi 33271522
cget_dblvec 35116624
dblrotate 35891901
dpe_submulz 69699626
dpe_mulz 75179583
dpe_subz 76425431
dpe_normalize 77499020
dbldotproduct 129250628
dpe_normalize0 153392230
itodbl_exp 177131529

Generated by: LCOV version 2.0-1