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

Generated by: LCOV version 1.16