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 30657-d14c2a9e4e) Lines: 605 680 89.0 %
Date: 2026-01-30 09:23:18 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 43834
sdivsi 102151
stack_calloc 110357
gc_stoi 155888
dvdui 167195
subis 170920
Fl_ellj_pre 238058
mod16 241107
mindd 264342
truedivis 266960
cmpri 282310
Mod32 311108
uutoineg 363059
Mod16 389733
cgetg_block 424864
gc_utoi 468578
dvdiu 576268
mpdiv 665624
cmpsr 796098
rdivss 839647
real2n 1067043
addri 1106259
gc_utoipos 1153491
real_0 1156538
equalis 1185610
equalsi 1185793
mpround 1216582
absrnz_equal2n 1292621
umodui 1296276
cmpss 1392943
Mod8 2074105
mpcmp 2226396
Mod2 2370238
udivuu_rem 2416412
gc_int 2631194
mulru 2765892
subir 3005112
equaliu 3018225
equalui 3018226
itou_or_0 3041712
maxdd 3178480
cmpis 3634857
negr 3671501
cmpsi 3866859
ceildivuu 3901930
Fl_center 4486187
absrnz_equal1 4519904
real_1_bit 4704861
maxuu 4815127
mod4 5083999
umuluu_or_0 5528952
umuluu_le 5803291
subsi 6093459
subri 6136322
truedivsi 6202031
affsi 6373213
mulrs 7181596
fractor 7376781
gc_NULL 7962441
cmpir 9432125
ugcdiu 10113721
cmpiu 10131507
cmpui 10131524
affectsign_safe 10728212
uabsdiviu_rem 11892741
addrs 12305196
smodss 12575781
rdivii 13105411
rdiviiz 13148127
mod8 13161264
mpabs_shallow 13428463
utor 13461979
affur 13462095
divii 14051214
subrs 16475976
dvdii 16555126
Fl_halve 18813093
modis 19638526
int_bit 20975029
smodis 21176060
evalvalser 21527935
hammingu 24048383
abscmpiu 32378048
abscmpui 32378251
mulri 38033727
mpexpo 38876276
absequaliu 39661340
absequalui 41410231
itos_or_0 43600171
Mod4 43789201
modsi 45225512
affui 45473823
Fl_div 46571298
stack_malloc 46625178
truedivii 47028640
umodi2n 48933050
sdivsi_rem 51429829
gc_bool 51980045
gc_ulong 52087605
affrr_fixlg 54654681
stack_malloc_align 55501300
absi_shallow 57426484
mod2 61112457
Fl_addmulmul_pre 64691706
minuu 69296507
remlll_pre 75960414
evalprecp 78669352
evalvalp 81626681
mpsqr 91028842
Fl_triple 94873732
addiu 95430229
Fl_sqr 95906584
addui 99074362
mod2BIL 103305638
fixlg 104198292
mpodd 115074818
icopyspec 117431135
togglesign_safe 125519163
real_1 129821264
subiu 131851867
subui 136825066
mpshift 153231592
dvmduBIL 165815468
shiftr 177987502
itou 178234534
addis 181550261
gc_double 184180268
vali 190366797
varncmp 217203310
gc_long 242320379
mpsub 251591791
utoineg 293934958
cgetineg 294796212
rtor 295252949
addsi 306734607
muliu 374557919
itos 462153369
shiftr_inplace 464399587
mulis 466272090
Fl_double 470737570
real_0_bit 479085422
addir 481444626
affsr 486172401
stor 486479129
mpadd 574300565
negi 636828760
itor 714988854
Fl_neg 719591484
umodsu 723982356
stoi 772736853
expu 775447020
lg2prec 799956055
mpmul 837560787
rcopy 903316072
affii 910445331
mpneg 916769377
subrr 1000261908
cgetg_copy 1480177703
cmpuu 1492943362
cgetr 1840560003
togglesign 1912540475
minss 2010089630
absi 2067634359
mpabs 2138422992
Fl_sqr_pre 2179432377
setabssign 2205137174
nbits2lg 2366169452
Fl_mul 2420492378
expi 2448445263
addrr 2877962854
remii 3006621689
adduu 3408609292
stackdummy 3640628538
Fl_mul_pre 4103149707
Fl_add 4407283182
leafcopy 4973328548
shift_right 5634111940
dvmdsBIL 7012707030
Fl_sub 7278675360
subii 7639528504
shift_left 7678073630
Fl_addmul_pre 7678898477
uutoi 8809546458
icopy 9049505794
maxss 9709964818
utoi 11895318467
addii 12403215582
evalexpo 13138358893
utoipos 14143084575
gc_const 15510610796
cgetipos 16313315812
cgetg 24555058138
cgeti 27080940321
new_chunk 93223856317
evallg 95184554426
set_avma 128983267579

Generated by: LCOV version 1.16