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 30590-f14e077362) Lines: 605 680 89.0 %
Date: 2025-12-31 09:21:49 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 43831
sdivsi 102151
stack_calloc 110361
gc_stoi 155884
dvdui 167195
subis 170920
Fl_ellj_pre 238048
mod16 241109
mindd 264324
truedivis 266952
cmpri 282310
Mod32 311108
uutoineg 363004
Mod16 389733
cgetg_block 407060
gc_utoi 468541
dvdiu 576273
mpdiv 665644
cmpsr 796071
rdivss 839647
real2n 1067024
addri 1105799
gc_utoipos 1153503
real_0 1156416
equalis 1181844
equalsi 1182026
mpround 1216581
absrnz_equal2n 1292705
umodui 1296276
cmpss 1379853
Mod8 2073838
mpcmp 2225716
udivuu_rem 2416412
Mod2 2479190
gc_int 2570045
mulru 2765892
subir 3005095
equalui 3018200
equaliu 3018202
itou_or_0 3041686
maxdd 3177424
cmpis 3634914
negr 3671390
cmpsi 3866913
ceildivuu 3879366
Fl_center 4486195
absrnz_equal1 4520502
real_1_bit 4704862
maxuu 4815195
mod4 4932483
umuluu_or_0 5503363
umuluu_le 5803291
subsi 6093652
subri 6123980
truedivsi 6202031
affsi 6373183
mulrs 7181596
fractor 7376779
gc_NULL 7961884
cmpir 9427621
ugcdiu 10105259
cmpiu 10118546
cmpui 10118548
affectsign_safe 10727565
uabsdiviu_rem 11892741
addrs 12305450
smodss 12546577
rdivii 13103317
rdiviiz 13147468
mod8 13162612
mpabs_shallow 13428463
utor 13461805
affur 13461914
divii 14050882
subrs 16476010
dvdii 16557832
Fl_halve 18796130
modis 19638526
int_bit 20980941
smodis 21176060
evalvalser 21527935
hammingu 24048354
abscmpiu 32378304
abscmpui 32378327
mulri 38033572
mpexpo 38873958
absequaliu 39660878
absequalui 41409803
itos_or_0 43599117
Mod4 43748072
modsi 45225517
affui 45473825
Fl_div 46505508
stack_malloc 46626850
truedivii 47017142
umodi2n 49000325
sdivsi_rem 51429846
gc_bool 51988729
gc_ulong 52058117
affrr_fixlg 54655289
stack_malloc_align 55490715
absi_shallow 57416622
mod2 61113127
Fl_addmulmul_pre 64598093
minuu 69064422
remlll_pre 75898029
evalprecp 78670432
evalvalp 81626939
mpsqr 91017264
Fl_triple 94666376
addiu 95414880
Fl_sqr 95888093
addui 99058891
mod2BIL 103154100
fixlg 104198623
mpodd 115076531
icopyspec 117081275
togglesign_safe 125605176
real_1 129812434
subiu 131489042
subui 136461806
mpshift 153193821
dvmduBIL 163205723
itou 177596201
shiftr 177981070
addis 181591751
gc_double 184176525
vali 190313118
varncmp 217206308
gc_long 242224510
mpsub 251566380
utoineg 293811795
cgetineg 294673283
rtor 295250485
addsi 306777094
muliu 372032891
itos 462123202
shiftr_inplace 464299984
mulis 464502352
Fl_double 469931337
real_0_bit 479016479
addir 480529536
affsr 486254219
stor 486518761
mpadd 574255815
negi 636813007
itor 713507053
Fl_neg 719365262
umodsu 723971988
stoi 772617213
expu 775335089
lg2prec 798507392
mpmul 837502172
rcopy 903216471
affii 910469326
mpneg 916752626
subrr 1000234885
cgetg_copy 1480012393
cmpuu 1492615775
cgetr 1839125079
togglesign 1911227486
minss 2009482228
absi 2067685983
mpabs 2138447441
Fl_sqr_pre 2176639798
setabssign 2205116578
nbits2lg 2365594755
Fl_mul 2419822158
expi 2446660826
addrr 2876988864
remii 3007209176
adduu 3412696335
stackdummy 3640238612
Fl_mul_pre 4100265553
Fl_add 4401580580
leafcopy 4972203783
shift_right 5630309144
dvmdsBIL 7008137937
Fl_sub 7280254570
subii 7656407034
Fl_addmul_pre 7674819199
shift_left 7675999852
uutoi 8820673982
icopy 9056519813
maxss 9714516438
utoi 11913049055
addii 12413964177
evalexpo 13136565614
utoipos 14155064728
gc_const 15491996023
cgetipos 16316703900
cgetg 24540678022
cgeti 27112735723
new_chunk 93222749836
evallg 95184212041
set_avma 128944399579

Generated by: LCOV version 1.16