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 30712-26d8f09ef9) Lines: 607 680 89.3 %
Date: 2026-02-26 09:24:10 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 14728
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33723
cmprs 40996
cgetr_block 43798
sdivsi 102150
stack_calloc 110464
gc_stoi 155881
dvdui 167195
subis 171739
Fl_ellj_pre 238074
mindd 264337
truedivis 266953
cmpri 282310
mod16 307017
Mod32 311108
uutoineg 363837
Mod16 389733
cgetg_block 425013
gc_utoi 468625
dvdiu 576269
mpdiv 665632
cmpsr 796096
rdivss 839647
real2n 1067043
addri 1106244
equalis 1151048
equalsi 1151230
gc_utoipos 1153485
real_0 1156523
mpround 1216579
umodui 1290981
absrnz_equal2n 1292625
cmpss 1392943
Mod8 2074113
mpcmp 2226376
Mod2 2370145
udivuu_rem 2418330
gc_int 2631199
mulru 2765892
subir 3005092
equaliu 3018285
equalui 3018285
itou_or_0 3146857
maxdd 3178558
cmpis 3633510
negr 3671746
cmpsi 3865508
ceildivuu 3904928
Fl_center 4486148
absrnz_equal1 4519972
real_1_bit 4704905
maxuu 4815420
mod4 5139419
umuluu_le 5803291
umuluu_or_0 6100426
subri 6131933
subsi 6182903
truedivsi 6202031
affsi 6437384
mulrs 7181596
fractor 7376919
gc_NULL 7962334
cmpir 9434411
ugcdiu 10148060
affectsign_safe 10728551
uabsdiviu_rem 11892741
cmpiu 12183474
cmpui 12183514
addrs 12305060
smodss 12609457
rdivii 13105559
rdiviiz 13147624
mpabs_shallow 13428463
utor 13461934
affur 13462052
divii 14043297
mod8 15582971
subrs 16475935
dvdii 16903509
Fl_halve 18831615
modis 19638526
int_bit 20948815
smodis 21176074
evalvalser 21529076
hammingu 24048419
abscmpiu 32100646
abscmpui 32100659
mulri 38033873
mpexpo 38875903
absequaliu 39398559
absequalui 41147453
itos_or_0 43601591
Mod4 43850958
modsi 45225631
affui 45473825
Fl_div 46537328
stack_malloc 46823416
umodi2n 48997064
sdivsi_rem 51429958
gc_ulong 52067959
gc_bool 54086977
affrr_fixlg 54655511
truedivii 54756421
stack_malloc_align 55500602
absi_shallow 57633097
mod2 61230784
Fl_addmulmul_pre 64718409
minuu 69609506
remlll_pre 75941688
evalprecp 78675055
evalvalp 81631583
mpsqr 91029019
Fl_triple 91200186
addiu 96165306
Fl_sqr 99459499
addui 99812857
fixlg 104201379
mod2BIL 106071087
mpodd 115175360
icopyspec 117470706
real_1 129870537
subiu 131923791
subui 136896916
mpshift 153226525
togglesign_safe 157260129
dvmduBIL 159153644
shiftr 178062558
itou 178233426
gc_double 184186205
addis 184521321
vali 190460106
varncmp 217195265
gc_long 242520727
mpsub 251560744
rtor 295259759
utoineg 297175847
cgetineg 298037249
addsi 309707471
muliu 375485635
Fl_double 453345772
shiftr_inplace 464480871
mulis 467052243
itos 472321775
real_0_bit 479504451
addir 481442783
affsr 486242885
stor 486559174
mpadd 574604224
negi 638028659
itor 715212902
Fl_neg 723692095
umodsu 734189349
expu 775638399
stoi 796832113
lg2prec 800255112
mpmul 837854292
rcopy 903471694
mpneg 917965885
affii 957814853
subrr 1000234250
cgetg_copy 1481437040
cmpuu 1493831170
cgetr 1840868537
togglesign 1941357851
minss 2010355220
absi 2068362238
mpabs 2139149128
Fl_sqr_pre 2157668204
setabssign 2205837676
nbits2lg 2367548003
expi 2422101047
Fl_mul 2428096134
addrr 2878151178
remii 3018585045
adduu 3443470070
stackdummy 3630915150
Fl_mul_pre 4095047903
Fl_add 4399011873
leafcopy 4977859103
shift_right 5633041308
dvmdsBIL 7031710918
Fl_sub 7222373834
Fl_addmul_pre 7675116912
subii 7676003044
shift_left 7694316527
uutoi 8931519999
icopy 9060109724
maxss 9714394607
utoi 12044903991
addii 12496993368
evalexpo 13162145997
utoipos 14256319917
gc_const 15498662789
cgetipos 16419248706
cgetg 24622716209
cgeti 27268959592
new_chunk 93633196895
evallg 95412241861
set_avma 129503261510

Generated by: LCOV version 1.16