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 30536-6f6fcf9613) Lines: 1335 1641 81.4 %
Date: 2025-11-03 09:21:41 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 4654190
Babai_fast 30195183
Babai_heuristic 288770
GS_extraprec 4724854
REDgen 196
RgM_Cholesky_dynprec 2967
RgM_flip 34918
RgM_flop 0
RgM_is_square_mat 45828
ZC_to_RC 15945
ZM2_lll_norms 4843682
ZM_flatter 626502
ZM_flatter_rank 624488
ZM_flattergram 961
ZM_flattergram_rank 961
ZM_is_knapsack 606435
ZM_is_lower 1204543
ZM_is_upper 4233762
ZM_lll_norms 7132642
ZM_to_RM 4244
absrsmall 696466
absrsmall2 401466
addmuliu2n 4105839
addmuliu642n 671548
addmuliu64_inplace 9581364
addmulziu 4580780
addmulzu2n 271563
addzi 17782932
affdbldpe 3206369
affdpe 25730690
affidpe 20749460
affii_or_copy_gc 1390562
cget_dblmat 8414552
cget_dblvec 34977582
cget_dpemat 3206372
cget_dpevec 13293292
condition_bound 4724854
dbg_flatter 0
dbg_flattergram 0
dbldotproduct 118200023
dbldotsquare 2480851
dblrotate 34631295
do_SWAPgen 196
dpeM_diagonal_shallow 20287
dpe_abscmp 14515247
dpe_abssmall 1390581
dpe_addmuluz 342913
dpe_addz 1943182
dpe_cmp 5262394
dpe_cmpmul 5262389
dpe_divz 14074662
dpe_muluz 799912
dpe_mulz 56960540
dpe_negz 244447
dpe_normalize 48105007
dpe_normalize0 108552638
dpe_submuluz 412453
dpe_submulz 51698492
dpe_subz 53729551
dperotate 652455
dpetor 94271
drop 1345958
flat 1345958
flattergram_i 2967
fplll 0
fplll_dpe 1603186
fplll_fast 2103641
fplll_flatter 625449
fplll_heuristic 4244
gc_lll 4833
get_gaussred 44560
get_gramschmidt 1098366
gramschmidt_dynprec 2691916
gramschmidt_upper 1336
gsisinv 5192485
incrementalGSgen 168
itodbl_exp 162542496
kerint 42
kerint0 70
lll 1243328
lll_finish 2164344
lll_trivial 771733
lllall 36699
lllallgen 168
lllfp 5368022
lllgen 42
lllgram 9089
lllgramallgen 168
lllgramgen 42
lllgramint 36439
lllgramkerim 35
lllgramkerimgen 42
lllint 183
lllkerim 35
lllkerimgen 42
matkerint0 28
mpabscmp 4092937
mulshift 318942
nbits2prec64 7486697
pari_rint 10794272
potential 1345958
pslg 504
qflll0 301
qflllgram 63
qflllgram0 245
realdotproduct 1183370
realsqrdotproduct 197413
rotate 31923636
rotateG 443277
rotateG_fast 11543781
setG2_fast 17023773
setG2_heuristic 187610
setG_fast 22651865
setG_heuristic 205626
set_line 24922483
sizered 1345958
spread 5849840
submuliu2n 4199990
submuliu642n 687471
submuliu64_inplace 9632106
submulshift 1507243
submulziu 5923464
submulzu2n 262549
subzi 18524410
truncexpo 12138
u64toi 19900941
u64toineg 671548
update_alpha 11987194
vectail_inplace 2090118

Generated by: LCOV version 1.16