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 30674-be81ecfdd4) Lines: 605 680 89.0 %
Date: 2026-02-11 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 14728
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33709
cmprs 40996
cgetr_block 43761
sdivsi 102148
stack_calloc 110375
gc_stoi 155882
dvdui 167195
subis 170917
Fl_ellj_pre 238051
mod16 241107
mindd 264341
truedivis 266959
cmpri 282310
Mod32 311108
uutoineg 362771
Mod16 389733
cgetg_block 424914
gc_utoi 468640
dvdiu 576268
mpdiv 665647
cmpsr 796081
rdivss 839647
real2n 1067062
addri 1106253
gc_utoipos 1153470
real_0 1156530
equalis 1185592
equalsi 1185774
mpround 1216579
absrnz_equal2n 1292651
umodui 1296276
cmpss 1392943
Mod8 2074033
mpcmp 2226377
Mod2 2370194
udivuu_rem 2418330
gc_int 2631186
mulru 2765892
subir 3005099
equaliu 3018232
equalui 3018232
itou_or_0 3041718
maxdd 3178642
cmpis 3634894
negr 3671698
cmpsi 3866893
ceildivuu 3904533
Fl_center 4486145
absrnz_equal1 4519946
real_1_bit 4705087
maxuu 4815254
mod4 5084635
umuluu_or_0 5534217
umuluu_le 5803291
subsi 6094055
subri 6134763
truedivsi 6202031
affsi 6373426
mulrs 7181596
fractor 7376930
gc_NULL 7962808
cmpir 9436387
ugcdiu 10112703
cmpiu 10133393
cmpui 10133415
affectsign_safe 10727395
uabsdiviu_rem 11892741
addrs 12305081
smodss 12629176
rdivii 13106572
rdiviiz 13148989
mod8 13162718
mpabs_shallow 13428463
utor 13461971
affur 13462082
divii 14052539
subrs 16476036
dvdii 16563188
Fl_halve 18817362
modis 19638526
int_bit 20952621
smodis 21176060
evalvalser 21528999
hammingu 24048376
abscmpiu 33123464
abscmpui 33123602
mulri 38033762
mpexpo 38876307
absequaliu 39398503
absequalui 41147431
itos_or_0 43601041
Mod4 43796422
modsi 45225479
affui 45473823
Fl_div 46557701
stack_malloc 46625412
truedivii 47035242
umodi2n 48940395
sdivsi_rem 51429817
gc_bool 51986783
gc_ulong 52068534
affrr_fixlg 54653930
stack_malloc_align 55501695
absi_shallow 58172570
mod2 61112345
Fl_addmulmul_pre 64660543
minuu 68823447
remlll_pre 76427552
evalprecp 78669434
evalvalp 81627046
mpsqr 91033296
Fl_triple 95050217
Fl_sqr 95912737
addiu 96919725
addui 100563868
mod2BIL 103306544
fixlg 104197540
mpodd 115075863
icopyspec 117433930
togglesign_safe 125522928
real_1 129822811
subiu 131853206
subui 136826529
mpshift 153284821
dvmduBIL 165995381
shiftr 177986210
itou 178274831
addis 181582521
gc_double 184167544
vali 190381328
varncmp 217197696
gc_long 242459601
mpsub 251581379
utoineg 293978848
cgetineg 294840515
rtor 295262033
addsi 306767817
muliu 374581829
itos 462171747
shiftr_inplace 464504865
mulis 466283406
Fl_double 471057944
real_0_bit 479742654
addir 481436028
affsr 486174313
stor 486479916
mpadd 574826560
negi 636866044
itor 715094039
Fl_neg 724236258
umodsu 734196855
stoi 771836843
expu 775455147
lg2prec 800055520
mpmul 838105156
rcopy 903315193
affii 910658711
mpneg 916833970
subrr 1000351851
cgetg_copy 1480375092
cmpuu 1492944596
cgetr 1840734925
togglesign 1912726373
minss 2010892829
absi 2067540536
mpabs 2138327464
Fl_sqr_pre 2180139834
setabssign 2205036380
nbits2lg 2367122222
Fl_mul 2422036317
expi 2448727145
addrr 2879200673
remii 3008363072
adduu 3412358105
stackdummy 3645625859
Fl_mul_pre 4101307041
Fl_add 4408586227
leafcopy 4976000406
shift_right 5636276827
dvmdsBIL 7015225320
Fl_sub 7292180254
subii 7642696064
Fl_addmul_pre 7678816159
shift_left 7679701568
uutoi 8817987288
icopy 9055163023
maxss 9721349836
utoi 11907227811
addii 12413060784
evalexpo 13143661059
utoipos 14155405623
gc_const 15513550276
cgetipos 16324827767
cgetg 24573747735
cgeti 27097388397
new_chunk 93271646265
evallg 95241014506
set_avma 129047135940

Generated by: LCOV version 1.16