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 30735-65f72320ad) Lines: 605 680 89.0 %
Date: 2026-03-16 09:23:47 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 10374
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33730
cmprs 40996
cgetr_block 43779
sdivsi 102151
stack_calloc 110560
gc_stoi 155902
dvdui 167195
subis 171740
Fl_ellj_pre 238052
mindd 264380
truedivis 266979
cmpri 282310
mod16 307030
Mod32 311108
uutoineg 363213
Mod16 389733
cgetg_block 425324
gc_utoi 468728
dvdiu 576277
mpdiv 665532
cmpsr 796104
rdivss 839647
real2n 1067479
addri 1106311
equalis 1150994
equalsi 1151153
gc_utoipos 1153599
real_0 1156642
mpround 1216583
umodui 1290953
absrnz_equal2n 1292617
cmpss 1392943
Mod8 2074040
mpcmp 2226332
Mod2 2369333
udivuu_rem 2418379
gc_int 2631193
mulru 2765892
subir 3004955
equaliu 3018929
equalui 3018929
itou_or_0 3146999
maxdd 3179606
cmpis 3633543
negr 3671807
cmpsi 3865544
ceildivuu 3905578
Fl_center 4486193
absrnz_equal1 4520316
real_1_bit 4707223
maxuu 4815019
mod4 5139194
umuluu_le 5803291
subri 6096615
umuluu_or_0 6113614
subsi 6183015
truedivsi 6202031
affsi 6439648
mulrs 7181596
fractor 7376931
gc_NULL 7962353
cmpir 9434604
ugcdiu 10147501
affectsign_safe 10730192
uabsdiviu_rem 11892741
cmpiu 12180280
cmpui 12180289
addrs 12305126
smodss 12589209
rdivii 13103996
rdiviiz 13146206
mpabs_shallow 13428463
utor 13463007
affur 13463120
divii 14059354
mod8 15577892
subrs 16478115
dvdii 16899300
Fl_halve 18834370
modis 19638526
int_bit 20934900
smodis 21176081
evalvalser 21529069
hammingu 24048644
abscmpiu 33109953
abscmpui 33110024
mulri 38033973
mpexpo 38877641
absequaliu 39352622
absequalui 41101542
itos_or_0 43601554
Mod4 43857601
modsi 45225663
affui 45473825
Fl_div 46582932
stack_malloc 46825411
umodi2n 49001632
sdivsi_rem 51429993
gc_ulong 52079816
affrr_fixlg 54656521
truedivii 54684301
stack_malloc_align 55527107
gc_bool 56134687
absi_shallow 57076506
mod2 61229275
Fl_addmulmul_pre 64720832
minuu 69692353
remlll_pre 76057304
evalprecp 78672826
evalvalp 81629614
mpsqr 91038567
Fl_triple 91381370
addiu 98183329
Fl_sqr 99482086
addui 101830876
fixlg 104202864
mod2BIL 106065040
mpodd 115173239
icopyspec 117468476
real_1 129869440
subiu 131923862
subui 136898430
mpshift 153314690
togglesign_safe 157170255
dvmduBIL 161165629
shiftr 178088630
itou 178237388
gc_double 184182881
addis 184514423
vali 190427597
varncmp 198517371
gc_long 242533403
mpsub 251623536
rtor 295304434
utoineg 297183433
cgetineg 298044393
addsi 309701139
muliu 375439009
Fl_double 453532238
shiftr_inplace 464517841
mulis 467010301
itos 472245353
real_0_bit 477618358
addir 481452996
affsr 486274713
stor 486591804
mpadd 572928929
negi 640361917
itor 715256364
Fl_neg 723706461
umodsu 734167616
expu 775717989
stoi 796933770
lg2prec 800350647
mpmul 836244358
rcopy 903494435
mpneg 920366161
affii 957447064
subrr 1000350277
cgetg_copy 1487240078
cmpuu 1490435343
cgetr 1840973979
togglesign 1943495158
minss 2009544769
absi 2066019285
mpabs 2136875457
Fl_sqr_pre 2158146529
setabssign 2203567096
nbits2lg 2365684025
expi 2421698216
Fl_mul 2429974724
addrr 2876158461
remii 3018248158
adduu 3445196935
stackdummy 3655700755
Fl_mul_pre 4092364197
Fl_add 4399311895
leafcopy 4978691515
shift_right 5633127314
dvmdsBIL 7030980225
Fl_sub 7234958787
Fl_addmul_pre 7681093435
subii 7681709432
shift_left 7694212768
uutoi 8929482999
icopy 9057588584
maxss 9718475867
utoi 12044093890
addii 12541250619
evalexpo 13159370831
utoipos 14255648193
gc_const 15581772517
cgetipos 16416713240
cgetg 24520221247
cgeti 27265907381
new_chunk 93529317991
evallg 95361406945
set_avma 129506971510

Generated by: LCOV version 1.16