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 30556-bb9f5f8fc8) Lines: 1335 1641 81.4 %
Date: 2025-11-25 09:20:50 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 4642374
Babai_fast 29954630
Babai_heuristic 288721
GS_extraprec 4719414
REDgen 196
RgM_Cholesky_dynprec 2918
RgM_flip 34813
RgM_flop 0
RgM_is_square_mat 45828
ZC_to_RC 15889
ZM2_lll_norms 4834905
ZM_flatter 625740
ZM_flatter_rank 623726
ZM_flattergram 947
ZM_flattergram_rank 947
ZM_is_knapsack 603815
ZM_is_lower 1202905
ZM_is_upper 4226947
ZM_lll_norms 7116198
ZM_to_RM 4237
absrsmall 695823
absrsmall2 400996
addmuliu2n 4096917
addmuliu642n 667356
addmuliu64_inplace 9323345
addmulziu 4580412
addmulzu2n 271563
addzi 17781947
affdbldpe 3199490
affdpe 25402275
affidpe 20637092
affii_or_copy_gc 1389316
cget_dblmat 8392351
cget_dblvec 34834476
cget_dpemat 3199497
cget_dpevec 13249936
condition_bound 4719414
dbg_flatter 0
dbg_flattergram 0
dbldotproduct 116801404
dbldotsquare 2470416
dblrotate 34390390
do_SWAPgen 196
dpeM_diagonal_shallow 20217
dpe_abscmp 14423774
dpe_abssmall 1389336
dpe_addmuluz 342872
dpe_addz 1942987
dpe_cmp 5251738
dpe_cmpmul 5251738
dpe_divz 13982436
dpe_muluz 797362
dpe_mulz 55701176
dpe_negz 240962
dpe_normalize 47082823
dpe_normalize0 106420743
dpe_submuluz 409939
dpe_submulz 50449568
dpe_subz 52477535
dperotate 652336
dpetor 93921
drop 1344016
flat 1344017
flattergram_i 2918
fplll 0
fplll_dpe 1599747
fplll_fast 2098092
fplll_flatter 624673
fplll_heuristic 4237
gc_lll 4814
get_gaussred 44510
get_gramschmidt 1096566
gramschmidt_dynprec 2688035
gramschmidt_upper 1280
gsisinv 5186150
incrementalGSgen 168
itodbl_exp 160511862
kerint 42
kerint0 70
lll 1241458
lll_finish 2158324
lll_trivial 769078
lllall 36699
lllallgen 168
lllfp 5359447
lllgen 42
lllgram 9089
lllgramallgen 168
lllgramgen 42
lllgramint 36439
lllgramkerim 35
lllgramkerimgen 42
lllint 183
lllkerim 35
lllkerimgen 42
matkerint0 28
mpabscmp 4081559
mulshift 316711
nbits2prec64 7475576
pari_rint 10697210
potential 1344017
pslg 504
qflll0 301
qflllgram 63
qflllgram0 245
realdotproduct 1182454
realsqrdotproduct 197336
rotate 31698861
rotateG 443217
rotateG_fast 11463539
setG2_fast 16904853
setG2_heuristic 187582
setG_fast 22506234
setG_heuristic 205464
set_line 24769421
sizered 1344018
spread 5840651
submuliu2n 4178633
submuliu642n 683409
submuliu64_inplace 9364045
submulshift 1494285
submulziu 5905067
submulzu2n 262549
subzi 18511206
truncexpo 11844
u64toi 19370799
u64toineg 667356
update_alpha 11906804
vectail_inplace 2084935

Generated by: LCOV version 1.16