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 30586-ccf601f509) Lines: 605 680 89.0 %
Date: 2025-12-24 09:20:59 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 110363
gc_stoi 155889
dvdui 167195
subis 170919
Fl_ellj_pre 238051
mod16 241109
mindd 264324
truedivis 266968
cmpri 282310
Mod32 311108
uutoineg 362482
Mod16 389733
cgetg_block 407109
gc_utoi 468607
dvdiu 576268
mpdiv 665621
cmpsr 796099
rdivss 839647
real2n 1067023
addri 1105741
gc_utoipos 1153478
real_0 1156399
equalis 1181906
equalsi 1182089
mpround 1216585
absrnz_equal2n 1292740
umodui 1296276
cmpss 1379853
Mod8 2073807
mpcmp 2225729
udivuu_rem 2416412
Mod2 2479173
gc_int 2570009
mulru 2765892
subir 3005076
equaliu 3018196
equalui 3018196
itou_or_0 3041693
maxdd 3177137
cmpis 3634863
negr 3671401
cmpsi 3866861
ceildivuu 3880059
Fl_center 4486136
absrnz_equal1 4520562
real_1_bit 4704771
maxuu 4815268
mod4 4932603
umuluu_or_0 5524893
umuluu_le 5803291
subsi 6093440
subri 6133711
truedivsi 6202031
affsi 6373095
mulrs 7181596
fractor 7376760
gc_NULL 7961648
cmpir 9433191
ugcdiu 10104863
cmpiu 10118216
cmpui 10118236
affectsign_safe 10725688
uabsdiviu_rem 11892741
addrs 12305511
smodss 12530127
rdivii 13100961
rdiviiz 13146094
mod8 13162995
mpabs_shallow 13428463
utor 13461797
affur 13461919
divii 14044330
subrs 16475939
dvdii 16569952
Fl_halve 18774787
modis 19638526
int_bit 20944004
smodis 21176060
evalvalser 21527935
hammingu 24048409
abscmpui 33066286
abscmpiu 33066917
mulri 38033711
mpexpo 38878168
absequaliu 39660876
absequalui 41409819
itos_or_0 43597844
Mod4 43740638
modsi 45225498
affui 45473825
Fl_div 46499205
stack_malloc 46627073
truedivii 47028714
umodi2n 48992763
sdivsi_rem 51429826
gc_bool 51998168
gc_ulong 52058348
affrr_fixlg 54653867
stack_malloc_align 55494630
absi_shallow 58106823
mod2 61114009
Fl_addmulmul_pre 64594217
minuu 69151002
remlll_pre 75685057
evalprecp 78669720
evalvalp 81626343
mpsqr 91030081
Fl_triple 94291298
Fl_sqr 95874439
addiu 96803691
addui 100447671
mod2BIL 103154072
fixlg 104197460
mpodd 115077542
icopyspec 117081171
togglesign_safe 125616354
real_1 129818501
subiu 131489235
subui 136461656
mpshift 153143630
dvmduBIL 165734610
itou 177595812
shiftr 177979515
addis 181605510
gc_double 184152390
vali 190313866
varncmp 217206409
gc_long 242229592
mpsub 251610064
utoineg 293811651
cgetineg 294672912
rtor 295245004
addsi 306790673
muliu 371881561
itos 462134153
shiftr_inplace 464107138
mulis 464521322
Fl_double 468214198
real_0_bit 479359981
addir 480515579
affsr 486173761
stor 486455329
mpadd 574626059
negi 636834184
itor 713462749
Fl_neg 719146119
umodsu 723943088
stoi 772791732
expu 775267424
lg2prec 798438631
mpmul 837862607
rcopy 903162199
affii 910311246
mpneg 916751800
subrr 1000231731
cgetg_copy 1479991492
cmpuu 1492608961
cgetr 1838940837
togglesign 1911176829
minss 2009003328
absi 2067603816
mpabs 2138375816
Fl_sqr_pre 2170261386
setabssign 2205043939
nbits2lg 2365498391
Fl_mul 2419905436
expi 2446689871
addrr 2876990001
remii 3004885020
adduu 3413256895
stackdummy 3642445675
Fl_mul_pre 4082245403
Fl_add 4398635612
leafcopy 4972763483
shift_right 5628384794
dvmdsBIL 7005795615
Fl_sub 7271516030
subii 7656104398
Fl_addmul_pre 7658439736
shift_left 7674892989
uutoi 8815677282
icopy 9055215490
maxss 9709064257
utoi 11909314585
addii 12408234948
evalexpo 13131033810
utoipos 14151392487
gc_const 15489165604
cgetipos 16313334539
cgetg 24538273137
cgeti 27102178755
new_chunk 93206816036
evallg 95165897745
set_avma 128915777505

Generated by: LCOV version 1.16