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 30773-2078653b96) Lines: 605 680 89.0 %
Date: 2026-04-02 09:26:53 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
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 3313
stack_calloc_align 3325
varnmin 10374
uabsdivui_rem 16693
absr 19040
addss 25067
subss 25067
subuu 25067
dvdis 33737
cmprs 40996
cgetr_block 44257
sdivsi 102151
stack_calloc 110697
gc_stoi 155905
dvdui 167195
subis 171740
Fl_ellj_pre 238040
mindd 264379
truedivis 268374
cmpri 284263
mod16 307026
Mod32 311108
uutoineg 362266
Mod16 389733
cgetg_block 426419
gc_utoi 468748
dvdiu 576272
mpdiv 665533
umodui 711392
cmpsr 796104
rdivss 839647
real2n 1068608
addri 1106285
equalis 1151282
equalsi 1151464
gc_utoipos 1153574
real_0 1157751
mpround 1216579
absrnz_equal2n 1300261
cmpss 1392943
Mod8 2073917
mpcmp 2226394
Mod2 2370211
udivuu_rem 2418379
gc_int 2742573
mulru 2765892
subir 3004995
equaliu 3021713
equalui 3021715
itou_or_0 3147017
maxdd 3211800
cmpis 3634481
negr 3682481
cmpsi 3866481
ceildivuu 3903055
Fl_center 4486193
absrnz_equal1 4553884
real_1_bit 4714112
mod4 5141081
subri 6107800
subsi 6184577
truedivsi 6202031
umuluu_or_0 6320449
affsi 6446218
maxuu 6610882
mulrs 7181596
fractor 7379014
umuluu_le 7617880
gc_NULL 7963593
cmpir 9447719
ugcdiu 10320661
affectsign_safe 10731368
uabsdiviu_rem 11892741
addrs 12361053
smodss 12429949
cmpui 12980247
cmpiu 12980446
rdivii 13105852
rdiviiz 13149506
mpabs_shallow 13428463
divii 14052253
utor 14335077
affur 14335184
mod8 15587274
subrs 16536401
dvdii 16894868
Fl_halve 18762555
modis 19638526
int_bit 20914918
smodis 21176088
hammingu 24048707
evalvalser 24359582
abscmpiu 33461431
abscmpui 33461610
mulri 38284539
mpexpo 38880611
absequaliu 39546493
absequalui 41296498
Mod4 43845165
itos_or_0 44910687
modsi 45242161
affui 45491532
Fl_div 46806048
stack_malloc 46928868
umodi2n 48987976
sdivsi_rem 51446489
gc_ulong 52080790
truedivii 54745786
stack_malloc_align 55540031
affrr_fixlg 56107646
gc_bool 56772261
absi_shallow 57516075
mod2 62589323
Fl_addmulmul_pre 64568778
minuu 69634448
remlll_pre 75629803
evalprecp 78669935
evalvalp 81626702
Fl_triple 87175096
mpsqr 91044909
addiu 98985037
Fl_sqr 99436418
addui 103060061
fixlg 105718502
mod2BIL 107446317
mpodd 116092851
icopyspec 117798151
subiu 133395167
real_1 133649143
subui 138371206
mpshift 153512227
togglesign_safe 157285681
dvmduBIL 165703581
itou 179081227
gc_double 184179806
shiftr 187931904
vali 190833594
addis 194681101
varncmp 198760033
gc_long 242625914
mpsub 251639263
utoineg 297824793
cgetineg 298685516
rtor 303768027
addsi 319863866
muliu 373254849
Fl_double 441806943
shiftr_inplace 467069206
mulis 467131734
itos 476317803
real_0_bit 482470795
addir 483064802
affsr 501177790
stor 501589301
mpadd 573109014
negi 640782609
itor 716757020
Fl_neg 729076649
umodsu 734178264
expu 796825491
stoi 798941726
lg2prec 815665931
mpmul 837341614
rcopy 916789045
mpneg 926445937
affii 964459456
subrr 1006392513
cgetg_copy 1490156524
cmpuu 1490477229
cgetr 1875802277
togglesign 1953443479
minss 2026143617
absi 2067066978
mpabs 2138029618
setabssign 2205097615
Fl_sqr_pre 2335032790
nbits2lg 2402714109
expi 2424591643
Fl_mul 2439168906
addrr 2931701026
remii 3060355370
adduu 3449130661
stackdummy 3687977345
Fl_mul_pre 4218934556
leafcopy 5061708815
shift_right 5733060498
Fl_add 6147109237
dvmdsBIL 7149668762
Fl_sub 7395426762
Fl_addmul_pre 7664500669
subii 7718105198
shift_left 7795397256
uutoi 8934623245
icopy 9150867831
maxss 9705884971
utoi 12051570363
addii 12531457544
evalexpo 13391777388
utoipos 14269150111
gc_const 15647933127
cgetipos 16459128258
cgetg 25536057812
cgeti 27470561585
new_chunk 95135206616
evallg 96854317104
set_avma 131358570955

Generated by: LCOV version 1.16