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-09 09:24:55 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 43763
sdivsi 102150
stack_calloc 110580
gc_stoi 155902
dvdui 167195
subis 171739
Fl_ellj_pre 238025
mindd 264384
truedivis 266987
cmpri 282310
mod16 307028
Mod32 311108
uutoineg 363519
Mod16 389733
cgetg_block 425141
gc_utoi 468696
dvdiu 576276
mpdiv 665509
cmpsr 796102
rdivss 839647
real2n 1067447
addri 1106251
equalis 1151062
equalsi 1151244
gc_utoipos 1153590
real_0 1156667
mpround 1216577
umodui 1290953
absrnz_equal2n 1292618
cmpss 1392943
Mod8 2074453
mpcmp 2226364
Mod2 2370340
udivuu_rem 2418379
gc_int 2631183
mulru 2765892
subir 3004947
equaliu 3018931
equalui 3018932
itou_or_0 3147021
maxdd 3179390
cmpis 3633571
negr 3671866
cmpsi 3865569
ceildivuu 3904318
Fl_center 4486194
absrnz_equal1 4520362
real_1_bit 4706976
maxuu 4815413
mod4 5139547
umuluu_le 5803291
subri 6098220
umuluu_or_0 6148507
subsi 6182874
truedivsi 6202031
affsi 6439342
mulrs 7181596
fractor 7376931
gc_NULL 7961625
cmpir 9435851
ugcdiu 10147402
affectsign_safe 10729179
uabsdiviu_rem 11892741
cmpiu 12184426
cmpui 12184654
addrs 12305225
smodss 12732306
rdivii 13106163
rdiviiz 13147952
mpabs_shallow 13428463
utor 13462989
affur 13463090
divii 14055495
mod8 15578655
subrs 16478170
dvdii 16901956
Fl_halve 18826756
modis 19638526
int_bit 20990748
smodis 21176081
evalvalser 21529069
hammingu 24048688
abscmpiu 32245231
abscmpui 32245300
mulri 38033960
mpexpo 38876298
absequaliu 39353422
absequalui 41102340
itos_or_0 43602652
Mod4 43864704
modsi 45225681
affui 45473825
Fl_div 46588440
stack_malloc 46825682
umodi2n 49010223
sdivsi_rem 51430008
gc_ulong 52080183
affrr_fixlg 54657846
truedivii 54717866
stack_malloc_align 55525804
gc_bool 56148670
absi_shallow 56212184
mod2 61229857
Fl_addmulmul_pre 64701750
minuu 69725550
remlll_pre 76091256
evalprecp 78673509
evalvalp 81630217
mpsqr 91037400
Fl_triple 91531099
addiu 96444377
Fl_sqr 99488299
addui 100091957
fixlg 104204248
mod2BIL 106065545
mpodd 115174328
icopyspec 117469027
real_1 129871501
subiu 131923813
subui 136898281
mpshift 153330101
togglesign_safe 157263941
dvmduBIL 161355512
shiftr 178084877
itou 178237553
gc_double 184182455
addis 184567788
vali 190428418
varncmp 198517268
gc_long 242536733
mpsub 251613396
rtor 295304797
utoineg 297192624
cgetineg 298053204
addsi 309767946
muliu 375694217
Fl_double 453986294
shiftr_inplace 464718105
mulis 467023168
itos 472295834
real_0_bit 477917558
addir 481452254
affsr 486316041
stor 486606801
mpadd 573133408
negi 640365594
itor 715478059
Fl_neg 723813090
umodsu 734158872
expu 775737088
stoi 796989293
lg2prec 800565841
mpmul 836462387
rcopy 903498682
mpneg 920375436
affii 958485353
subrr 1000418850
cgetg_copy 1487229255
cmpuu 1490465267
cgetr 1841224573
togglesign 1943807693
minss 2010143615
absi 2066093724
mpabs 2136950794
Fl_sqr_pre 2159682519
setabssign 2203659439
nbits2lg 2366362662
expi 2422128412
Fl_mul 2428926521
addrr 2877365518
remii 3021819269
adduu 3445498931
stackdummy 3653443136
Fl_mul_pre 4101351248
Fl_add 4398995547
leafcopy 4978882293
shift_right 5635754503
dvmdsBIL 7034289289
Fl_sub 7235893644
subii 7685602000
shift_left 7695753895
Fl_addmul_pre 7697812487
uutoi 8935069060
icopy 9061326813
maxss 9718080980
utoi 12049066542
addii 12549985469
evalexpo 13164898842
utoipos 14261032208
gc_const 15585616753
cgetipos 16420420691
cgetg 24520897125
cgeti 27288340236
new_chunk 93574941413
evallg 95395408787
set_avma 129576830841

Generated by: LCOV version 1.16