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 30587-f85873d515) Lines: 605 680 89.0 %
Date: 2025-12-28 09:21: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
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 43816
sdivsi 102149
stack_calloc 110345
gc_stoi 155882
dvdui 167195
subis 170919
Fl_ellj_pre 238062
mod16 241109
mindd 264323
truedivis 266968
cmpri 282310
Mod32 311108
uutoineg 362929
Mod16 389733
cgetg_block 407111
gc_utoi 468625
dvdiu 576271
mpdiv 665637
cmpsr 796108
rdivss 839647
real2n 1067008
addri 1105788
gc_utoipos 1153442
real_0 1156407
equalis 1181881
equalsi 1182063
mpround 1216583
absrnz_equal2n 1292733
umodui 1296276
cmpss 1379853
Mod8 2073851
mpcmp 2225777
udivuu_rem 2416412
Mod2 2479173
gc_int 2569996
mulru 2765892
subir 3005067
equaliu 3018206
equalui 3018206
itou_or_0 3041682
maxdd 3177314
cmpis 3634855
negr 3671296
cmpsi 3866854
ceildivuu 3878396
Fl_center 4486192
absrnz_equal1 4520511
real_1_bit 4704796
maxuu 4815162
mod4 4932476
umuluu_or_0 5523980
umuluu_le 5803291
subsi 6093478
subri 6125750
truedivsi 6202031
affsi 6373054
mulrs 7181596
fractor 7376772
gc_NULL 7961128
cmpir 9434549
ugcdiu 10104825
cmpiu 10117028
cmpui 10117049
affectsign_safe 10726837
uabsdiviu_rem 11892741
addrs 12305590
smodss 12521681
rdivii 13101384
rdiviiz 13146547
mod8 13162191
mpabs_shallow 13428463
utor 13461812
affur 13461921
divii 14044049
subrs 16475808
dvdii 16568087
Fl_halve 18778225
modis 19638526
int_bit 20951724
smodis 21176060
evalvalser 21527935
hammingu 24048393
abscmpiu 33826923
abscmpui 33826949
mulri 38033627
mpexpo 38879233
absequaliu 39660657
absequalui 41409592
itos_or_0 43598260
Mod4 43745156
modsi 45225526
affui 45473825
Fl_div 46473307
stack_malloc 46627029
truedivii 47011772
umodi2n 48997372
sdivsi_rem 51429854
gc_bool 51994607
gc_ulong 52057035
affrr_fixlg 54653388
stack_malloc_align 55497632
absi_shallow 58866514
mod2 61112828
Fl_addmulmul_pre 64574341
minuu 69174888
remlll_pre 75657768
evalprecp 78669256
evalvalp 81625903
mpsqr 91032067
Fl_triple 94281921
Fl_sqr 95872133
addiu 98315074
addui 101959149
mod2BIL 103153953
fixlg 104197151
mpodd 115076336
icopyspec 117081361
togglesign_safe 125595647
real_1 129812143
subiu 131487781
subui 136460424
mpshift 153153995
dvmduBIL 165687349
itou 177595427
shiftr 177981987
addis 181572910
gc_double 184167761
vali 190314681
varncmp 217206383
gc_long 242231167
mpsub 251593946
utoineg 293809841
cgetineg 294671137
rtor 295243224
addsi 306756447
muliu 371944701
itos 462112641
shiftr_inplace 464038158
mulis 464517177
Fl_double 468697684
real_0_bit 479412014
addir 480521258
affsr 486208269
stor 486476089
mpadd 574628503
negi 636857436
itor 713430111
Fl_neg 719203846
umodsu 723954652
stoi 772834440
expu 775289177
lg2prec 798383581
mpmul 837837153
rcopy 903182077
affii 910135412
mpneg 916777862
subrr 1000207453
cgetg_copy 1479994350
cmpuu 1492646886
cgetr 1838921238
togglesign 1911170713
minss 2008946284
absi 2067652111
mpabs 2138428938
Fl_sqr_pre 2172989140
setabssign 2205104859
nbits2lg 2365659058
Fl_mul 2420957892
expi 2446500199
addrr 2877126703
remii 3005553893
adduu 3414675560
stackdummy 3647821488
Fl_mul_pre 4091195593
Fl_add 4402492885
leafcopy 4972885895
shift_right 5628682844
dvmdsBIL 7005979413
Fl_sub 7289224920
subii 7656004672
Fl_addmul_pre 7664620300
shift_left 7674693429
uutoi 8818483464
icopy 9055300384
maxss 9727054575
utoi 11912872201
addii 12410832701
evalexpo 13131993809
utoipos 14154890696
gc_const 15491057827
cgetipos 16317112726
cgetg 24549947978
cgeti 27108346147
new_chunk 93227720570
evallg 95193743335
set_avma 128948547274

Generated by: LCOV version 1.16