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-15 09:23:45 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 43738
sdivsi 102148
stack_calloc 110548
gc_stoi 155901
dvdui 167195
subis 171737
Fl_ellj_pre 238030
mindd 264379
truedivis 266960
cmpri 282310
mod16 307028
Mod32 311108
uutoineg 363963
Mod16 389733
cgetg_block 425309
gc_utoi 468691
dvdiu 576279
mpdiv 665523
cmpsr 796101
rdivss 839647
real2n 1067461
addri 1106270
equalis 1151049
equalsi 1151231
gc_utoipos 1153594
real_0 1156636
mpround 1216579
umodui 1290953
absrnz_equal2n 1292640
cmpss 1392943
Mod8 2074204
mpcmp 2226381
Mod2 2370232
udivuu_rem 2418379
gc_int 2631184
mulru 2765892
subir 3004983
equaliu 3018932
equalui 3018934
itou_or_0 3147029
maxdd 3179383
cmpis 3633461
negr 3671771
cmpsi 3865471
ceildivuu 3904088
Fl_center 4486107
absrnz_equal1 4520275
real_1_bit 4707056
maxuu 4815303
mod4 5139239
umuluu_le 5803291
subri 6099054
umuluu_or_0 6148622
subsi 6182848
truedivsi 6202031
affsi 6439381
mulrs 7181596
fractor 7376921
gc_NULL 7962114
cmpir 9437068
ugcdiu 10147304
affectsign_safe 10729091
uabsdiviu_rem 11892741
cmpiu 12181942
cmpui 12182170
addrs 12305085
smodss 12592985
rdivii 13104931
rdiviiz 13146226
mpabs_shallow 13428463
utor 13462934
affur 13463029
divii 14043663
mod8 15579636
subrs 16478084
dvdii 16908226
Fl_halve 18823900
modis 19638526
int_bit 20963643
smodis 21176081
evalvalser 21529069
hammingu 24048701
abscmpiu 33110446
abscmpui 33110494
mulri 38034005
mpexpo 38876529
absequaliu 39352493
absequalui 41101400
itos_or_0 43602382
Mod4 43859795
modsi 45225687
affui 45473824
Fl_div 46581104
stack_malloc 46825381
umodi2n 49005226
sdivsi_rem 51430014
gc_ulong 52059510
affrr_fixlg 54657583
truedivii 54709662
stack_malloc_align 55525704
gc_bool 56149293
absi_shallow 57076931
mod2 61229788
Fl_addmulmul_pre 64642191
minuu 69527705
remlll_pre 76156632
evalprecp 78675489
evalvalp 81632003
mpsqr 91038206
Fl_triple 91357054
addiu 98182922
Fl_sqr 99451587
addui 101830407
fixlg 104203996
mod2BIL 106064847
mpodd 115174048
icopyspec 117468315
real_1 129870320
subiu 131924861
subui 136899436
mpshift 153308456
togglesign_safe 157190229
dvmduBIL 161321013
shiftr 178084111
itou 178237160
gc_double 184168964
addis 184539493
vali 190427407
varncmp 198517089
gc_long 242533760
mpsub 251615930
rtor 295308622
utoineg 297195761
cgetineg 298056380
addsi 309725460
muliu 375555190
Fl_double 453388695
shiftr_inplace 464622789
mulis 467009870
itos 472277858
real_0_bit 477891044
addir 481454597
affsr 486310593
stor 486617357
mpadd 573140488
negi 640375696
itor 715210944
Fl_neg 723694675
umodsu 734155447
expu 775735357
stoi 796602061
lg2prec 800277701
mpmul 836456160
rcopy 903500425
mpneg 920378025
affii 957691289
subrr 1000378351
cgetg_copy 1487221096
cmpuu 1490441356
cgetr 1840965560
togglesign 1943568761
minss 2009470493
absi 2066011052
mpabs 2136859474
Fl_sqr_pre 2155578595
setabssign 2203554449
nbits2lg 2366070315
expi 2421992566
Fl_mul 2429864528
addrr 2876676581
remii 3018707070
adduu 3445557444
stackdummy 3655966360
Fl_mul_pre 4092159284
Fl_add 4392856179
leafcopy 4978674921
shift_right 5633869366
dvmdsBIL 7031887913
Fl_sub 7235354832
Fl_addmul_pre 7672493611
subii 7682509668
shift_left 7694743127
uutoi 8930441011
icopy 9058007024
maxss 9719102077
utoi 12045369605
addii 12541906742
evalexpo 13160569520
utoipos 14256910768
gc_const 15582407529
cgetipos 16418611348
cgetg 24523401281
cgeti 27267900669
new_chunk 93535736432
evallg 95365422063
set_avma 129515281978

Generated by: LCOV version 1.16