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 30862-ea47bd413c) Lines: 1336 1642 81.4 %
Date: 2026-05-06 09:26:47 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 4656452
Babai_fast 30148243
Babai_heuristic 289747
GS_extraprec 4727395
REDgen 196
RgM_Cholesky_dynprec 2967
RgM_flip 34918
RgM_flop 0
RgM_is_square_mat 45828
ZC_to_RC 15952
ZM2_lll_norms 4850842
ZM_flatter 626862
ZM_flatter_rank 624848
ZM_flattergram 961
ZM_flattergram_rank 961
ZM_is_knapsack 606684
ZM_is_lower 1205489
ZM_is_upper 4236948
ZM_lll_norms 7140967
ZM_to_RM 4246
absrsmall 698128
absrsmall2 402705
addmuliu2n 4084943
addmuliu642n 668118
addmuliu64_inplace 9567362
addmulziu 4580713
addmulzu2n 271563
addzi 17782990
affdbldpe 3208096
affdpe 25733497
affidpe 20757333
affii_or_copy_gc 1390412
cget_dblmat 8419520
cget_dblvec 35003207
cget_dpemat 3208095
cget_dpevec 13301671
condition_bound 4727395
dbg_flatter 0
dbg_flattergram 0
dbldotproduct 118039510
dbldotsquare 2482627
dblrotate 34554688
do_SWAPgen 196
dpeM_diagonal_shallow 1547
dpe_abscmp 14519408
dpe_abssmall 1390427
dpe_addmuluz 342907
dpe_addz 1943123
dpe_cmp 5264715
dpe_cmpmul 5264710
dpe_divz 14078925
dpe_muluz 799875
dpe_mulz 56969959
dpe_negz 244383
dpe_normalize 48114926
dpe_normalize0 108578327
dpe_submuluz 412418
dpe_submulz 51705437
dpe_subz 53736520
dperotate 652346
dpetor 23604
drop 1347063
flat 1347063
flattergram_i 2967
fplll 0
fplll_dpe 1604050
fplll_fast 2104880
fplll_flatter 625809
fplll_heuristic 4246
gc_lll 4835
get_gaussred 44539
get_gramschmidt 1099272
gramschmidt_dynprec 2694123
gramschmidt_upper 1336
gsisinv 5195564
incrementalGSgen 168
itodbl_exp 162328574
kerint 28
kerint0 56
lll 1244992
lll_finish 2165484
lll_trivial 771792
lllall 36699
lllallgen 168
lllfp 5372967
lllgen 42
lllgram 9089
lllgramallgen 168
lllgramgen 42
lllgramint 36439
lllgramkerim 35
lllgramkerimgen 42
lllint 183
lllkerim 35
lllkerimgen 42
matkerint0 28
mpabscmp 4097105
mulshift 317611
nbits2prec64 7492694
pari_rint 10769777
potential 1347062
pslg 504
qflll0 301
qflllgram 63
qflllgram0 245
realdotproduct 1186355
realsqrdotproduct 198160
rotate 31880815
rotateG 443653
rotateG_fast 11518240
setG2_fast 16988061
setG2_heuristic 188352
setG_fast 22619574
setG_heuristic 206374
set_line 24891388
sizered 1347063
spread 5853142
submuliu2n 4169924
submuliu642n 683445
submuliu64_inplace 9625873
submulshift 1499795
submulziu 5923324
submulzu2n 262549
subzi 18524760
truncexpo 12139
u64toi 19876680
u64toineg 668118
update_alpha 11961998
vectail_inplace 2091315

Generated by: LCOV version 1.16