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 30616-7aa4fb0184) Lines: 605 680 89.0 %
Date: 2026-01-18 09:22:29 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 15547
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33709
cmprs 40996
cgetr_block 43810
sdivsi 102150
stack_calloc 110371
gc_stoi 155882
dvdui 167195
subis 170918
Fl_ellj_pre 238042
mod16 241107
mindd 264342
truedivis 266943
cmpri 282310
Mod32 311108
uutoineg 362219
Mod16 389733
cgetg_block 407214
gc_utoi 468533
dvdiu 576269
mpdiv 665641
cmpsr 796108
rdivss 839647
real2n 1067022
addri 1105767
gc_utoipos 1153446
real_0 1156415
equalis 1185538
equalsi 1185720
mpround 1216580
absrnz_equal2n 1292590
umodui 1296276
cmpss 1379853
Mod8 2074049
mpcmp 2225872
Mod2 2370346
udivuu_rem 2416412
gc_int 2631179
mulru 2765892
subir 3005100
equaliu 3018198
equalui 3018198
itou_or_0 3041723
maxdd 3178387
cmpis 3634863
negr 3671337
cmpsi 3866861
ceildivuu 3901123
Fl_center 4486158
absrnz_equal1 4519880
real_1_bit 4704800
maxuu 4815400
mod4 5084282
umuluu_or_0 5549902
umuluu_le 5803291
subsi 6093479
subri 6095856
truedivsi 6202031
affsi 6373174
mulrs 7181596
fractor 7376775
gc_NULL 7962122
cmpir 9447195
ugcdiu 10113170
cmpui 10131269
cmpiu 10131444
affectsign_safe 10726647
uabsdiviu_rem 11892741
addrs 12305154
smodss 12474582
rdivii 13100051
rdiviiz 13145578
mod8 13161606
mpabs_shallow 13428463
utor 13461824
affur 13461939
divii 14040752
subrs 16475451
dvdii 16568828
Fl_halve 18761337
modis 19638526
int_bit 20956042
smodis 21176060
evalvalser 21527935
hammingu 24048412
abscmpiu 32418190
abscmpui 32418242
mulri 38033734
mpexpo 38873498
absequaliu 39661155
absequalui 41410073
itos_or_0 43598286
Mod4 43780721
modsi 45225512
affui 45473824
Fl_div 46526921
stack_malloc 46627014
truedivii 47001397
umodi2n 48924719
sdivsi_rem 51429857
gc_bool 51987915
gc_ulong 52048815
affrr_fixlg 54651329
stack_malloc_align 55497332
absi_shallow 57469601
mod2 61112686
Fl_addmulmul_pre 64525146
minuu 69324273
remlll_pre 75543221
evalprecp 78668779
evalvalp 81625482
mpsqr 91028183
Fl_triple 94162011
addiu 95516107
Fl_sqr 95874873
addui 99160169
mod2BIL 103303340
fixlg 104194299
mpodd 115075305
icopyspec 117424095
togglesign_safe 125518776
real_1 129788986
subiu 131843307
subui 136816228
mpshift 153134373
dvmduBIL 165633932
shiftr 177970388
itou 178232536
addis 181544298
gc_double 184134719
vali 190375998
varncmp 217202977
gc_long 242312154
mpsub 251540188
utoineg 293939184
cgetineg 294800652
rtor 295238631
addsi 306725679
muliu 374495045
itos 462098331
shiftr_inplace 463931160
mulis 466282130
Fl_double 468217360
real_0_bit 481183029
addir 481381231
affsr 486142071
stor 486425384
mpadd 576144527
negi 636810003
itor 714649700
Fl_neg 719060512
umodsu 723914530
stoi 772873125
expu 775322442
lg2prec 799657650
mpmul 839297483
rcopy 903136654
affii 910187452
mpneg 916708076
subrr 1000050911
cgetg_copy 1480092875
cmpuu 1492615761
cgetr 1840009582
togglesign 1911822717
minss 2008561186
absi 2068124970
mpabs 2138920499
Fl_sqr_pre 2170340647
setabssign 2205617192
nbits2lg 2367897270
Fl_mul 2418726628
expi 2448215781
addrr 2877726288
remii 3004634144
adduu 3408636482
stackdummy 3638679205
Fl_mul_pre 4088887498
Fl_add 4396169537
leafcopy 4973228666
shift_right 5627194658
dvmdsBIL 7006547774
Fl_sub 7253801976
subii 7654733432
Fl_addmul_pre 7662938489
shift_left 7675872542
uutoi 8807755240
icopy 9051727349
maxss 9692998600
utoi 11895835623
addii 12400925763
evalexpo 13131825474
utoipos 14139346152
gc_const 15507831813
cgetipos 16302392406
cgetg 24532346825
cgeti 27094289336
new_chunk 93211177136
evallg 95169990727
set_avma 128939334630

Generated by: LCOV version 1.16