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

Generated by: LCOV version 1.16