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 30585-4c42182400) Lines: 605 680 89.0 %
Date: 2025-12-23 09:21:19 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 43798
sdivsi 102150
stack_calloc 110330
gc_stoi 155884
dvdui 167195
subis 170919
Fl_ellj_pre 237644
mod16 241097
mindd 263986
truedivis 266956
cmpri 282310
Mod32 311108
uutoineg 362596
Mod16 389733
cgetg_block 407070
gc_utoi 468554
dvdiu 576422
mpdiv 665631
cmpsr 796096
rdivss 839647
real2n 1067030
addri 1105679
gc_utoipos 1153465
real_0 1156419
equalis 1181865
equalsi 1182048
mpround 1216580
absrnz_equal2n 1292660
umodui 1296273
cmpss 1378477
Mod8 2073914
mpcmp 2225692
udivuu_rem 2416412
Mod2 2479228
gc_int 2570020
mulru 2765892
subir 3005107
equaliu 3018185
equalui 3018187
itou_or_0 3041671
maxdd 3177314
cmpis 3634832
negr 3671301
cmpsi 3866830
ceildivuu 3876865
Fl_center 4486194
absrnz_equal1 4520447
real_1_bit 4704935
maxuu 4815157
mod4 4932587
umuluu_or_0 5504356
umuluu_le 5803291
subri 6084792
subsi 6087362
truedivsi 6202031
affsi 6371063
mulrs 7181596
fractor 7376766
gc_NULL 7960332
cmpir 9443975
ugcdiu 10104153
cmpiu 10117567
cmpui 10117579
affectsign_safe 10726291
uabsdiviu_rem 11892741
addrs 12305431
smodss 12527085
rdivii 13102104
rdiviiz 13147399
mod8 13154965
mpabs_shallow 13428463
utor 13461817
affur 13461923
divii 14035938
subrs 16475856
dvdii 16564590
Fl_halve 18760042
modis 19638526
int_bit 20953718
smodis 21176060
evalvalser 21527935
hammingu 24048320
abscmpiu 31941920
abscmpui 31941954
mulri 38033677
mpexpo 38873554
absequaliu 39660850
absequalui 41409786
itos_or_0 43598478
Mod4 43738726
modsi 45225486
affui 45473825
Fl_div 46488951
stack_malloc 46626945
truedivii 46992301
umodi2n 48991099
sdivsi_rem 51429813
gc_bool 51990102
gc_ulong 52095082
affrr_fixlg 54653299
stack_malloc_align 55489846
absi_shallow 56982268
mod2 61110971
Fl_addmulmul_pre 64525867
minuu 69132223
remlll_pre 75572661
evalprecp 78669162
evalvalp 81625722
mpsqr 91022535
Fl_triple 94231163
addiu 94543865
Fl_sqr 95837765
addui 98187754
mod2BIL 103143924
fixlg 104196184
mpodd 115074968
icopyspec 117080643
togglesign_safe 125595495
real_1 129784022
subiu 131485085
subui 136456426
mpshift 153130252
dvmduBIL 163535645
itou 177596481
shiftr 177971126
addis 181607444
gc_double 184114622
vali 190313223
varncmp 217208341
gc_long 242222177
mpsub 251529867
utoineg 293747784
cgetineg 294609322
rtor 295244981
addsi 306793088
muliu 371870307
itos 462064995
shiftr_inplace 464063559
mulis 464500997
Fl_double 467995103
addir 480485514
real_0_bit 480984123
affsr 486171070
stor 486450296
mpadd 575991755
negi 636784148
itor 713310791
Fl_neg 719143206
umodsu 723923441
stoi 772744961
expu 775255510
lg2prec 798354948
mpmul 839138754
rcopy 903093525
affii 910154847
mpneg 916696380
subrr 1000109890
cgetg_copy 1479984001
cmpuu 1492611945
cgetr 1838727831
togglesign 1910982867
minss 2008546357
absi 2067593635
mpabs 2138384216
Fl_sqr_pre 2169818742
setabssign 2205050782
nbits2lg 2366622554
Fl_mul 2417166704
expi 2445845194
addrr 2878275148
remii 3004641285
adduu 3410187248
stackdummy 3635418066
Fl_mul_pre 4085498370
Fl_add 4396416225
leafcopy 4971919062
shift_right 5627708949
dvmdsBIL 7004722524
Fl_sub 7253841848
subii 7655744722
Fl_addmul_pre 7659756144
shift_left 7674339397
uutoi 8811167109
icopy 9054556541
maxss 9691748726
utoi 11901825831
addii 12408699201
evalexpo 13131472317
utoipos 14143744457
gc_const 15490433024
cgetipos 16305596303
cgetg 24526407969
cgeti 27095154762
new_chunk 93186223460
evallg 95136846478
set_avma 128890046045

Generated by: LCOV version 1.16