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 - kernel/none - level1.h (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30634-7c77b4d1a9) Lines: 605 680 89.0 %
Date: 2026-01-25 09:23:13 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Mod64 0
affectsign 0
divsi_rem 0
divss 0
divss_rem 0
dvdiiz 0
dvdisz 0
dvdiuz 0
dvmdis 0
dvmdsi 0
dvmdss 0
get_avma 0
mod64 0
modss 0
mpceil 0
mpfloor 0
rdivis 0
rdivsi 0
remis 0
remsi 0
remss 0
sdivss_rem 0
shiftl 0
shiftlr 0
mptrunc 49
real_m2n 126
absr 140
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 2851
stack_calloc_align 3307
varnmin 15547
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33709
cmprs 40996
cgetr_block 43737
sdivsi 102150
stack_calloc 110345
gc_stoi 155887
dvdui 167195
subis 170912
Fl_ellj_pre 238035
mod16 241110
mindd 264338
truedivis 266957
cmpri 282310
Mod32 311108
uutoineg 362398
Mod16 389733
cgetg_block 424916
gc_utoi 468625
dvdiu 576267
mpdiv 665636
cmpsr 796104
rdivss 839647
real2n 1067014
addri 1105792
gc_utoipos 1153493
real_0 1156405
equalis 1185485
equalsi 1185667
mpround 1216577
absrnz_equal2n 1292659
umodui 1296276
cmpss 1379853
Mod8 2074091
mpcmp 2225905
Mod2 2370290
udivuu_rem 2416412
gc_int 2631180
mulru 2765892
subir 3005078
equaliu 3018228
equalui 3018229
itou_or_0 3041727
maxdd 3178399
cmpis 3634847
negr 3671102
cmpsi 3866842
ceildivuu 3900215
Fl_center 4486195
absrnz_equal1 4519841
real_1_bit 4704805
maxuu 4815008
mod4 5084352
umuluu_or_0 5516510
umuluu_le 5803291
subri 6091753
subsi 6093582
truedivsi 6202031
affsi 6373106
mulrs 7181596
fractor 7376778
gc_NULL 7962263
cmpir 9446617
ugcdiu 10114281
cmpiu 10133308
cmpui 10133329
affectsign_safe 10728061
uabsdiviu_rem 11892741
addrs 12304788
smodss 12490493
rdivii 13099290
rdiviiz 13143322
mod8 13163248
mpabs_shallow 13428463
utor 13461765
affur 13461861
divii 14039439
subrs 16475405
dvdii 16561471
Fl_halve 18786496
modis 19638526
int_bit 20962248
smodis 21176060
evalvalser 21527935
hammingu 24048425
abscmpui 33405305
abscmpiu 33405359
mulri 38033657
mpexpo 38871779
absequaliu 39661317
absequalui 41410237
itos_or_0 43597141
Mod4 43770631
modsi 45225555
affui 45473825
Fl_div 46481964
stack_malloc 46627082
truedivii 47009546
umodi2n 48917170
sdivsi_rem 51429882
gc_bool 51984945
gc_ulong 52058252
affrr_fixlg 54650946
stack_malloc_align 55496437
absi_shallow 58456405
mod2 61113681
Fl_addmulmul_pre 64619949
minuu 69006669
remlll_pre 75700109
evalprecp 78663998
evalvalp 81620322
mpsqr 91024532
Fl_triple 94225639
Fl_sqr 95889056
addiu 97493306
addui 101137351
mod2BIL 103305034
fixlg 104194196
mpodd 115076710
icopyspec 117430178
togglesign_safe 125531032
real_1 129785442
subiu 131843641
subui 136816406
mpshift 153204830
dvmduBIL 163228375
shiftr 177966596
itou 178234136
addis 181582580
gc_double 184118193
vali 190376620
varncmp 217203243
gc_long 242310634
mpsub 251530459
utoineg 293948677
cgetineg 294810536
rtor 295235567
addsi 306768356
muliu 374550750
itos 462114745
shiftr_inplace 464160351
mulis 466282854
Fl_double 468472351
real_0_bit 481106126
addir 481383326
affsr 486067023
stor 486409774
mpadd 576059826
negi 636744317
itor 714731995
Fl_neg 719134439
umodsu 723933372
stoi 772254144
expu 775359356
lg2prec 799739341
mpmul 839215873
rcopy 903149321
affii 910382757
mpneg 916664899
subrr 1000146022
cgetg_copy 1480178138
cmpuu 1492972314
cgetr 1840048807
togglesign 1912186788
minss 2009717086
absi 2068328348
mpabs 2139130834
Fl_sqr_pre 2173250922
setabssign 2205841086
nbits2lg 2367699627
Fl_mul 2421200346
expi 2448570192
addrr 2878539408
remii 3006520135
adduu 3409844035
stackdummy 3644556974
Fl_mul_pre 4088997907
Fl_add 4402514408
leafcopy 4972855827
shift_right 5630975222
dvmdsBIL 7009829676
Fl_sub 7286651281
subii 7639653664
Fl_addmul_pre 7667839055
shift_left 7675706728
uutoi 8802609568
icopy 9048776165
maxss 9722568996
utoi 11889792044
addii 12398457797
evalexpo 13133691368
utoipos 14138455665
gc_const 15510014663
cgetipos 16308513700
cgetg 24559032670
cgeti 27070861600
new_chunk 93203700004
evallg 95175199235
set_avma 128957024014

Generated by: LCOV version 1.16