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 30640-c2c58e18c5) Lines: 1336 1642 81.4 %
Date: 2026-01-27 08:51:18 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 954
ZM_flattergram_rank 954
gramschmidt_upper 1052
RgM_Cholesky_dynprec 2946
flattergram_i 2946
ZM_to_RM 4218
fplll_heuristic 4218
gc_lll 4482
lllgram 9089
truncexpo 11772
dpeM_diagonal_shallow 15092
ZC_to_RC 15826
RgM_flip 32276
lllgramint 36439
lllall 36699
get_gaussred 43333
RgM_is_square_mat 45828
dpetor 80033
setG2_heuristic 149068
realsqrdotproduct 158778
setG_heuristic 166817
dpe_negz 224592
Babai_heuristic 228112
submulzu2n 262549
addmulzu2n 271563
mulshift 305489
absrsmall2 326265
dpe_addmuluz 331617
dpe_submuluz 392641
rotateG 411830
ZM_is_knapsack 563572
absrsmall 567536
ZM_flatter_rank 611156
fplll_flatter 612110
ZM_flatter 613170
addmuliu642n 615148
u64toineg 615148
submuliu642n 632449
dperotate 632562
lll_trivial 682326
dpe_muluz 768809
realdotproduct 960143
get_gramschmidt 1044718
ZM_is_lower 1154484
lll 1199334
drop 1312996
potential 1312996
flat 1312997
sizered 1312997
affii_or_copy_gc 1336162
dpe_abssmall 1336166
fplll_dpe 1386373
submulshift 1391725
vectail_inplace 1840739
fplll_fast 1842954
dpe_addz 1882079
lll_finish 1899354
dbldotsquare 2134793
gramschmidt_dynprec 2625990
cget_dpemat 2772740
affdbldpe 2772745
addmuliu2n 3750929
submuliu2n 3836795
ZM_is_upper 3955358
mpabscmp 3965581
Babai_dpe 4279029
addmulziu 4504344
GS_extraprec 4644195
condition_bound 4644195
ZM2_lll_norms 4677597
dpe_cmpmul 4879740
dpe_cmp 4879747
gsisinv 5071663
lllfp 5209519
spread 5684611
submulziu 5769054
ZM_lll_norms 6631423
nbits2prec64 7284593
cget_dblmat 7371807
addmuliu64_inplace 9188382
submuliu64_inplace 9234468
pari_rint 9674982
rotateG_fast 10353505
update_alpha 10765486
cget_dpevec 11779753
dpe_divz 13215507
dpe_abscmp 13651935
setG2_fast 15285312
addzi 17416984
subzi 18127944
u64toi 19055299
affidpe 19213044
setG_fast 20403491
set_line 22369532
affdpe 24423354
Babai_fast 27532206
rotate 28536712
dblrotate 31060379
cget_dblvec 31329124
dpe_normalize 45851708
dpe_submulz 49580512
dpe_subz 51544262
dpe_mulz 54460200
dpe_normalize0 103497339
dbldotproduct 109971371
itodbl_exp 151678554

Generated by: LCOV version 1.16