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

Generated by: LCOV version 1.16