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 30658-0716cf3506) Lines: 605 680 89.0 %
Date: 2026-01-31 09:22:40 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4374196564
Fl_addmul_pre 7671139750
Fl_addmulmul_pre 64650566
Fl_center 4486161
Fl_div 46557703
Fl_double 468765034
Fl_ellj_pre 238044
Fl_halve 18792265
Fl_mul 2419225294
Fl_mul_pre 4084602728
Fl_neg 719569949
Fl_sqr 95851079
Fl_sqr_pre 2172595491
Fl_sub 7257112380
Fl_triple 94579988
Mod16 389733
Mod2 2370171
Mod32 311108
Mod4 43766448
Mod64 0
Mod8 2074018
abscmpiu 32143805
abscmpui 32143977
absequaliu 39661170
absequalui 41410062
absi 2067624705
absi_shallow 57195161
absr 140
absrnz_equal1 4520018
absrnz_equal2n 1292668
addii 12402143908
addir 481419124
addis 181551078
addiu 94963825
addri 1106276
addrr 2877829211
addrs 12305129
addsi 306737135
addss 25067
addui 98607875
adduu 3408000389
affectsign 0
affectsign_safe 10726554
affii 910652110
affrr_fixlg 54654078
affsi 6373286
affsr 485996042
affui 45473825
affur 13461819
ceildivuu 3901945
cgetg 24543796578
cgetg_block 424856
cgetg_copy 1480165456
cgeti 27063208928
cgetineg 294793011
cgetipos 16303625273
cgetr 1840522631
cgetr_block 43594
cmpir 9435474
cmpis 3634664
cmpiu 10132687
cmpri 282310
cmprs 40996
cmpsi 3866809
cmpsr 796099
cmpss 1392943
cmpui 10132706
cmpuu 1492909800
divii 14049164
divsi_rem 0
divss 0
divss_rem 0
dvdii 16560982
dvdiiz 0
dvdis 33709
dvdisz 0
dvdiu 576263
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7011346416
dvmdsi 0
dvmdss 0
dvmduBIL 163444559
equalis 1185665
equaliu 3018236
equalsi 1185847
equalui 3018237
evalexpo 13134319848
evallg 95140556063
evalprecp 78659802
evalvalp 81617584
evalvalser 21527935
expi 2448637712
expu 775333468
fixlg 104197350
fractor 7376921
gc_NULL 7962867
gc_bool 51981169
gc_const 15510408523
gc_double 184195503
gc_int 2631086
gc_long 242311314
gc_stoi 155883
gc_ulong 52059606
gc_utoi 468539
gc_utoipos 1153478
get_avma 0
hammingu 24048411
icopy 9049510295
icopyspec 117430811
int_bit 20951548
itor 715114451
itos 462142338
itos_or_0 43599025
itou 178234252
itou_or_0 3041718
leafcopy 4972400250
lg2prec 799932435
maxdd 3178535
maxss 9690817400
maxuu 4814814
mindd 264341
minss 2010349035
minuu 69240317
mod16 241106
mod2 61113228
mod2BIL 103299213
mod32 259
mod4 5083706
mod64 0
mod8 13161703
modis 19638526
modsi 45225537
modss 0
mpabs 2138420585
mpabs_shallow 13428463
mpadd 574570951
mpceil 0
mpcmp 2226405
mpcopy 665
mpdiv 665635
mpexpo 38881325
mpfloor 0
mpmul 837867153
mpneg 916821405
mpodd 115076932
mpround 1216577
mpshift 153218952
mpsqr 91042810
mpsub 251650961
mptrunc 49
mulis 466259305
muliu 374459243
mulri 38033888
mulrs 7181596
mulru 2765892
nbits2lg 2366565401
negi 636874395
negr 3670959
new_chunk 93182816535
rcopy 903196295
rdivii 13103051
rdiviiz 13146925
rdivis 0
rdivsi 0
rdivss 839647
real2n 1067059
real_0 1156539
real_0_bit 479314666
real_1 129826212
real_1_bit 4705048
real_m1 455
real_m2n 126
remii 3006520858
remis 0
remlll_pre 75795154
remsi 0
remss 0
rtor 295246237
sdivsi 102147
sdivsi_rem 51429866
sdivss_rem 0
set_avma 128927884133
setabssign 2205142382
shift_left 7677058065
shift_right 5632726429
shiftl 0
shiftlr 0
shiftr 177978425
shiftr_inplace 464321383
smodis 21176060
smodss 12477330
stack_calloc 110375
stack_calloc_align 3307
stack_malloc 46625225
stack_malloc_align 55506324
stackdummy 3637331845
stoi 772662722
stor 486365993
subii 7640234464
subir 3005090
subis 170917
subiu 131849323
subri 6144430
subrr 1000301131
subrs 16475977
subsi 6093350
subss 25067
subui 136822459
subuu 25067
thuemorseu 2851
togglesign 1912490424
togglesign_safe 125501560
truedivii 47023881
truedivis 266944
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 16693
udivuu_rem 2416419
ugcdiu 10114005
ugcdui 2737
umodi2n 48913940
umodsu 723956191
umodui 1296276
umuluu_le 5803291
umuluu_or_0 5508959
utoi 11885648005
utoineg 293931441
utoipos 14134232907
utor 13461709
uutoi 8799238859
uutoineg 362169
vali 190364239
varncmp 217202974
varnmax 203
varnmin 15547

Generated by: LCOV version 1.16