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 30617-dd5c93fb0e) Lines: 605 680 89.0 %
Date: 2026-01-19 09:22:13 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 43782
sdivsi 102149
stack_calloc 110365
gc_stoi 155883
dvdui 167195
subis 170918
Fl_ellj_pre 238051
mod16 241110
mindd 264341
truedivis 266934
cmpri 282310
Mod32 311108
uutoineg 362523
Mod16 389733
cgetg_block 407212
gc_utoi 468623
dvdiu 576266
mpdiv 665631
cmpsr 796105
rdivss 839647
real2n 1067021
addri 1105658
gc_utoipos 1153463
real_0 1156419
equalis 1185573
equalsi 1185755
mpround 1216577
absrnz_equal2n 1292563
umodui 1296276
cmpss 1379853
Mod8 2073814
mpcmp 2225893
Mod2 2370249
udivuu_rem 2416412
gc_int 2631168
mulru 2765892
subir 3005076
equaliu 3018197
equalui 3018197
itou_or_0 3041726
maxdd 3178156
cmpis 3634880
negr 3671118
cmpsi 3866879
ceildivuu 3901589
Fl_center 4485863
absrnz_equal1 4519923
real_1_bit 4704808
maxuu 4815239
mod4 5083725
umuluu_or_0 5542669
umuluu_le 5803291
subsi 6093529
subri 6134672
truedivsi 6202031
affsi 6373133
mulrs 7181596
fractor 7376769
gc_NULL 7962420
cmpir 9436450
ugcdiu 10112943
cmpui 10133280
cmpiu 10133365
affectsign_safe 10725651
uabsdiviu_rem 11892741
addrs 12305248
smodss 12478532
rdivii 13100449
rdiviiz 13145992
mod8 13163636
mpabs_shallow 13428463
utor 13461789
affur 13461897
divii 14047145
subrs 16475623
dvdii 16568790
Fl_halve 18753937
modis 19638526
int_bit 20960974
smodis 21176060
evalvalser 21527935
hammingu 24048498
abscmpiu 33798276
abscmpui 33798287
mulri 38033495
mpexpo 38876549
absequaliu 39660650
absequalui 41409590
itos_or_0 43597938
Mod4 43777130
modsi 45225516
affui 45473825
Fl_div 46497296
stack_malloc 46627120
truedivii 47030014
umodi2n 48920602
sdivsi_rem 51429843
gc_bool 51990133
gc_ulong 52052002
affrr_fixlg 54650734
stack_malloc_align 55500211
absi_shallow 58847908
mod2 61113132
Fl_addmulmul_pre 64504837
minuu 69300658
remlll_pre 75609912
evalprecp 78667608
evalvalp 81624077
mpsqr 91028965
Fl_triple 93991685
Fl_sqr 95855374
addiu 98281420
addui 101925482
mod2BIL 103302605
fixlg 104193790
mpodd 115076363
icopyspec 117424821
togglesign_safe 125509362
real_1 129815030
subiu 131841487
subui 136814472
mpshift 153133025
dvmduBIL 163523919
shiftr 177973272
itou 178233390
addis 181580027
gc_double 184136180
vali 190377959
varncmp 217203071
gc_long 242307985
mpsub 251558332
utoineg 293945789
cgetineg 294807214
rtor 295235101
addsi 306764439
muliu 374465315
itos 462138736
shiftr_inplace 463817973
mulis 466277665
Fl_double 467297230
real_0_bit 479414861
addir 481410092
affsr 486128071
stor 486412598
mpadd 574589540
negi 636856908
itor 714723145
Fl_neg 719145459
umodsu 723942786
stoi 772880846
expu 775309477
lg2prec 799686801
mpmul 837746934
rcopy 903155277
affii 910244962
mpneg 916760768
subrr 1000050856
cgetg_copy 1480073296
cmpuu 1492606157
cgetr 1840116861
togglesign 1911861143
minss 2008772829
absi 2068268711
mpabs 2139045010
Fl_sqr_pre 2166864814
setabssign 2205749669
nbits2lg 2366637154
Fl_mul 2420798377
expi 2448354003
addrr 2876167489
remii 3004690103
adduu 3411644801
stackdummy 3645394284
Fl_mul_pre 4082729954
Fl_add 4391887564
leafcopy 4972723410
shift_right 5626979801
dvmdsBIL 7006286570
Fl_sub 7282057714
subii 7654893654
Fl_addmul_pre 7656872746
shift_left 7675746146
uutoi 8809094670
icopy 9051711416
maxss 9723143937
utoi 11900870365
addii 12401515349
evalexpo 13129389155
utoipos 14144280605
gc_const 15508658490
cgetipos 16307194579
cgetg 24541898023
cgeti 27093740272
new_chunk 93211955443
evallg 95189303527
set_avma 128944361316

Generated by: LCOV version 1.16