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 30734-f1f26dedcb) Lines: 605 680 89.0 %
Date: 2026-03-04 09:24:31 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 24997
subss 24997
subuu 24997
dvdis 33730
cmprs 40996
cgetr_block 43794
sdivsi 102079
stack_calloc 110558
gc_stoi 155902
dvdui 167195
subis 171668
Fl_ellj_pre 238068
mindd 264378
truedivis 266977
cmpri 282310
mod16 307031
Mod32 311108
uutoineg 363600
Mod16 389733
cgetg_block 425293
gc_utoi 468711
dvdiu 576274
mpdiv 665531
cmpsr 796100
rdivss 839647
real2n 1067468
addri 1106288
equalis 1151010
equalsi 1151192
gc_utoipos 1153583
real_0 1156585
mpround 1216578
umodui 1291821
absrnz_equal2n 1292586
cmpss 1392943
Mod8 2074025
mpcmp 2226353
Mod2 2370127
udivuu_rem 2418379
gc_int 2631201
mulru 2765892
subir 3004995
equaliu 3018723
equalui 3018723
itou_or_0 3146885
maxdd 3179466
cmpis 3633507
negr 3671805
cmpsi 3865502
ceildivuu 3905812
Fl_center 4486191
absrnz_equal1 4520230
real_1_bit 4707129
maxuu 4815702
mod4 5139294
umuluu_le 5803291
subri 6092729
umuluu_or_0 6128496
subsi 6182821
truedivsi 6202031
affsi 6439505
mulrs 7181596
fractor 7376926
gc_NULL 7961479
cmpir 9434019
ugcdiu 10147150
affectsign_safe 10730355
uabsdiviu_rem 11892741
cmpiu 12180506
cmpui 12180577
addrs 12305050
smodss 12630002
rdivii 13104425
rdiviiz 13146743
mpabs_shallow 13428463
utor 13463035
affur 13463151
divii 14050561
mod8 15578574
subrs 16477994
dvdii 16901065
Fl_halve 18829168
modis 19638526
int_bit 20962812
smodis 21176081
evalvalser 21529069
hammingu 24048662
abscmpui 32331961
abscmpiu 32332050
mulri 38033937
mpexpo 38877394
absequaliu 39352683
absequalui 41101601
itos_or_0 43601818
Mod4 43860437
modsi 45225676
affui 45473825
Fl_div 46538291
stack_malloc 46825029
umodi2n 49004140
sdivsi_rem 51430014
gc_ulong 52075877
affrr_fixlg 54656825
truedivii 54704020
stack_malloc_align 55523848
gc_bool 56139342
absi_shallow 56299235
mod2 61230396
Fl_addmulmul_pre 64749841
minuu 69667121
remlll_pre 75961341
evalprecp 78671118
evalvalp 81627616
mpsqr 91035321
Fl_triple 91525212
addiu 96626408
Fl_sqr 99503672
addui 100274010
fixlg 104203220
mod2BIL 106066573
mpodd 115175105
icopyspec 117468441
real_1 129870517
subiu 131921305
subui 136895671
mpshift 153312339
togglesign_safe 157183221
dvmduBIL 161267968
shiftr 178099224
itou 178236020
gc_double 184171737
addis 184552340
vali 190427250
varncmp 198513238
gc_long 242534276
mpsub 251596706
rtor 295318244
utoineg 297094220
cgetineg 297955078
addsi 309739169
muliu 375550600
Fl_double 454063536
shiftr_inplace 464509109
mulis 467002429
itos 472271067
real_0_bit 477558275
addir 481446876
affsr 486345482
stor 486625381
mpadd 572835584
negi 640306497
itor 715195722
Fl_neg 723565988
umodsu 734174248
expu 775787114
stoi 796851181
lg2prec 800195012
mpmul 836127099
rcopy 903514301
mpneg 920320819
affii 957540494
subrr 1000399812
cgetg_copy 1487108183
cmpuu 1490446372
cgetr 1841107428
togglesign 1943346949
minss 2008335477
absi 2065969154
mpabs 2136817405
Fl_sqr_pre 2156743081
setabssign 2203517016
nbits2lg 2365749300
expi 2420807781
Fl_mul 2427588334
addrr 2876732040
remii 3017893035
adduu 3443695103
stackdummy 3649327276
Fl_mul_pre 4088904025
Fl_add 4403339712
leafcopy 4978354516
shift_right 5634254443
dvmdsBIL 7032782264
Fl_sub 7220650488
Fl_addmul_pre 7678019005
subii 7681965621
shift_left 7695462282
uutoi 8932100424
icopy 9057514194
maxss 9702160458
utoi 12042424938
addii 12543552000
evalexpo 13162757535
utoipos 14253793123
gc_const 15582181408
cgetipos 16422158660
cgetg 24512873359
cgeti 27268319642
new_chunk 93540452548
evallg 95336040841
set_avma 129504315608

Generated by: LCOV version 1.16