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 30651-3e52073f6d) Lines: 605 680 89.0 %
Date: 2026-01-28 09:23:10 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 43867
sdivsi 102150
stack_calloc 110373
gc_stoi 155884
dvdui 167195
subis 170920
Fl_ellj_pre 238040
mod16 241107
mindd 264338
truedivis 266928
cmpri 282310
Mod32 311108
uutoineg 362483
Mod16 389733
cgetg_block 424870
gc_utoi 468614
dvdiu 576271
mpdiv 665643
cmpsr 796099
rdivss 839647
real2n 1067050
addri 1106246
gc_utoipos 1153477
real_0 1156518
equalis 1185509
equalsi 1185691
mpround 1216572
absrnz_equal2n 1292583
umodui 1296276
cmpss 1392943
Mod8 2074035
mpcmp 2226346
Mod2 2370232
udivuu_rem 2416412
gc_int 2631185
mulru 2765892
subir 3005092
equaliu 3018241
equalui 3018241
itou_or_0 3041737
maxdd 3178420
cmpis 3634878
negr 3671209
cmpsi 3866877
ceildivuu 3901424
Fl_center 4486195
absrnz_equal1 4519818
real_1_bit 4704931
maxuu 4814918
mod4 5084233
umuluu_or_0 5525843
umuluu_le 5803291
subsi 6093462
subri 6096866
truedivsi 6202031
affsi 6373182
mulrs 7181596
fractor 7376764
gc_NULL 7962311
cmpir 9449395
ugcdiu 10114251
cmpiu 10131866
cmpui 10131899
affectsign_safe 10727411
uabsdiviu_rem 11892741
addrs 12304715
smodss 12573589
rdivii 13103633
rdiviiz 13146929
mod8 13161228
mpabs_shallow 13428463
utor 13462006
affur 13462128
divii 14042946
subrs 16475448
dvdii 16556007
Fl_halve 18793332
modis 19638526
int_bit 20947675
smodis 21176060
evalvalser 21527935
hammingu 24048514
abscmpiu 32376686
abscmpui 32376842
mulri 38033666
mpexpo 38872046
absequaliu 39661311
absequalui 41410220
itos_or_0 43598850
Mod4 43781413
modsi 45225493
affui 45473825
Fl_div 46555074
stack_malloc 46624916
truedivii 47004549
umodi2n 48925015
sdivsi_rem 51429821
gc_bool 51977644
gc_ulong 52071784
affrr_fixlg 54651729
stack_malloc_align 55496382
absi_shallow 57426409
mod2 61114866
Fl_addmulmul_pre 64707376
minuu 69233109
remlll_pre 75813859
evalprecp 78664136
evalvalp 81621654
mpsqr 91027120
Fl_triple 94579664
addiu 95430008
Fl_sqr 95876926
addui 99074193
mod2BIL 103304921
fixlg 104195237
mpodd 115078459
icopyspec 117430489
togglesign_safe 125513857
real_1 129788313
subiu 131849715
subui 136822731
mpshift 153187769
dvmduBIL 165867489
shiftr 177974338
itou 178234203
addis 181589859
gc_double 184133515
vali 190365261
varncmp 217203287
gc_long 242318203
mpsub 251537929
utoineg 293931246
cgetineg 294792793
rtor 295245635
addsi 306776233
muliu 374450279
itos 462111878
shiftr_inplace 464127659
mulis 466268195
Fl_double 469591314
addir 481406371
real_0_bit 481435557
affsr 486049178
stor 486383878
mpadd 576337988
negi 636824605
itor 714683046
Fl_neg 719592144
umodsu 723973623
stoi 772617873
expu 775356368
lg2prec 799658344
mpmul 839520937
rcopy 903219228
affii 910326142
mpneg 916744407
subrr 1000106606
cgetg_copy 1480187927
cmpuu 1492944610
cgetr 1840010139
togglesign 1912388997
minss 2009770364
absi 2067560472
mpabs 2138371741
Fl_sqr_pre 2175565478
setabssign 2205100655
nbits2lg 2367796340
Fl_mul 2420343298
expi 2448781816
addrr 2879197729
remii 3005332079
adduu 3407715665
stackdummy 3639561953
Fl_mul_pre 4099709005
Fl_add 4407072956
leafcopy 4973047959
shift_right 5631218528
dvmdsBIL 7009486006
Fl_sub 7274370167
subii 7638964167
shift_left 7675798522
Fl_addmul_pre 7676557802
uutoi 8803242343
icopy 9046935382
maxss 9706345941
utoi 11888324515
addii 12397083551
evalexpo 13134112018
utoipos 14136158805
gc_const 15509381863
cgetipos 16306929627
cgetg 24551345618
cgeti 27068227633
new_chunk 93196793316
evallg 95159538303
set_avma 128943040436

Generated by: LCOV version 1.16