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 30617-dd5c93fb0e) Lines: 605 680 89.0 %
Date: 2026-01-21 09:23:33 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 43838
sdivsi 102149
stack_calloc 110361
gc_stoi 155885
dvdui 167195
subis 170918
Fl_ellj_pre 238070
mod16 241107
mindd 264343
truedivis 266950
cmpri 282310
Mod32 311108
uutoineg 362793
Mod16 389733
cgetg_block 407152
gc_utoi 468551
dvdiu 576269
mpdiv 665648
cmpsr 796103
rdivss 839647
real2n 1067017
addri 1105786
gc_utoipos 1153454
real_0 1156425
equalis 1185612
equalsi 1185794
mpround 1216575
absrnz_equal2n 1292602
umodui 1296276
cmpss 1379853
Mod8 2073782
mpcmp 2225860
Mod2 2370195
udivuu_rem 2416412
gc_int 2631199
mulru 2765892
subir 3005102
equaliu 3018192
equalui 3018192
itou_or_0 3041721
maxdd 3178423
cmpis 3634843
negr 3671310
cmpsi 3866846
ceildivuu 3902857
Fl_center 4486191
absrnz_equal1 4520010
real_1_bit 4704752
maxuu 4815389
mod4 5083795
umuluu_or_0 5517650
umuluu_le 5803291
subsi 6093317
subri 6094639
truedivsi 6202031
affsi 6373078
mulrs 7181596
fractor 7376778
gc_NULL 7961288
cmpir 9447681
ugcdiu 10113315
cmpui 10131533
cmpiu 10131629
affectsign_safe 10727100
uabsdiviu_rem 11892741
addrs 12305211
smodss 12495335
rdivii 13101127
rdiviiz 13145620
mod8 13163140
mpabs_shallow 13428463
utor 13461863
affur 13461976
divii 14040309
subrs 16475535
dvdii 16568011
Fl_halve 18773607
modis 19638526
int_bit 20976063
smodis 21176060
evalvalser 21527935
hammingu 24048485
abscmpiu 32387213
abscmpui 32387241
mulri 38033472
mpexpo 38873913
absequaliu 39660407
absequalui 41409343
itos_or_0 43598288
Mod4 43779922
modsi 45225538
affui 45473824
Fl_div 46481803
stack_malloc 46627167
truedivii 47005067
umodi2n 48923114
sdivsi_rem 51429866
gc_bool 51987857
gc_ulong 52079198
affrr_fixlg 54651145
stack_malloc_align 55497920
absi_shallow 57436685
mod2 61113274
Fl_addmulmul_pre 64561118
minuu 69310519
remlll_pre 75536969
evalprecp 78668539
evalvalp 81625092
mpsqr 91029614
Fl_triple 94253819
addiu 95458061
Fl_sqr 95901324
addui 99102146
mod2BIL 103307987
fixlg 104194204
mpodd 115077175
icopyspec 117424678
togglesign_safe 125505880
real_1 129789207
subiu 131845351
subui 136818312
mpshift 153150575
dvmduBIL 165665289
shiftr 177972932
itou 178233313
addis 181587318
gc_double 184075244
vali 190378371
varncmp 217203214
gc_long 242313052
mpsub 251538155
utoineg 293948357
cgetineg 294809859
rtor 295241703
addsi 306772307
muliu 374544345
itos 462103350
shiftr_inplace 463828252
mulis 466259933
Fl_double 468565235
real_0_bit 481152557
addir 481391453
affsr 486162419
stor 486439320
mpadd 576130449
negi 636805663
itor 714711735
Fl_neg 719204230
umodsu 723970669
stoi 772875620
expu 775336113
lg2prec 799794202
mpmul 839275726
rcopy 903177047
affii 910034386
mpneg 916711198
subrr 1000073520
cgetg_copy 1480104476
cmpuu 1492649054
cgetr 1840110139
togglesign 1911926941
minss 2008794975
absi 2068214980
mpabs 2139010562
Fl_sqr_pre 2171693945
setabssign 2205715134
nbits2lg 2367933816
Fl_mul 2418295472
expi 2448274205
addrr 2878305171
remii 3005230349
adduu 3408664707
stackdummy 3638759075
Fl_mul_pre 4089375188
Fl_add 4404374826
leafcopy 4973402695
shift_right 5628002379
dvmdsBIL 7007325528
Fl_sub 7261438174
subii 7654952208
Fl_addmul_pre 7655811013
shift_left 7676408151
uutoi 8808582471
icopy 9053642493
maxss 9698964081
utoi 11896765067
addii 12405944873
evalexpo 13133547232
utoipos 14139999841
gc_const 15508301196
cgetipos 16303084977
cgetg 24535358051
cgeti 27094801375
new_chunk 93221330471
evallg 95179291610
set_avma 128954075997

Generated by: LCOV version 1.16