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 30818-1d7bcd2a3c) Lines: 605 680 89.0 %
Date: 2026-04-16 09:26:05 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
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 3313
stack_calloc_align 3325
varnmin 10374
uabsdivui_rem 16693
absr 20510
addss 25067
subss 25067
subuu 25067
dvdis 33737
cmprs 40996
cgetr_block 44232
sdivsi 102149
stack_calloc 110684
gc_stoi 155897
dvdui 167195
subis 171738
Fl_ellj_pre 238052
mindd 264378
truedivis 268354
cmpri 284277
mod16 307028
Mod32 311108
uutoineg 362295
Mod16 389733
cgetg_block 423671
gc_utoi 468706
dvdiu 576273
mpdiv 652086
umodui 711392
cmpsr 796094
rdivss 839647
real2n 1068652
addri 1106287
equalis 1151329
equalsi 1151512
gc_utoipos 1153569
real_0 1157740
mpround 1216579
absrnz_equal2n 1301147
cmpss 1392943
Mod8 2073690
mpcmp 2226395
Mod2 2370041
udivuu_rem 2418379
gc_int 2739287
mulru 2765892
subir 3000067
equalui 3021806
equaliu 3021808
itou_or_0 3147020
maxdd 3211814
cmpis 3634428
negr 3683299
cmpsi 3866431
ceildivuu 3902513
Fl_center 4486097
absrnz_equal1 4556845
real_1_bit 4714243
mod4 5140582
subri 6090170
subsi 6184846
truedivsi 6202318
umuluu_or_0 6286796
affsi 6446424
maxuu 6610782
mulrs 7181596
fractor 7379018
umuluu_le 7617880
gc_NULL 7962524
cmpir 9446655
ugcdiu 10320568
affectsign_safe 10731619
uabsdiviu_rem 11892741
addrs 12364124
smodss 12506256
cmpiu 12982265
cmpui 12982422
rdivii 13103792
rdiviiz 13148625
mpabs_shallow 13428463
divii 14050818
utor 14336632
affur 14336737
mod8 15585229
subrs 16544375
dvdii 16903204
Fl_halve 18759863
modis 19638526
int_bit 20963397
smodis 21176088
hammingu 24048732
evalvalser 24359582
abscmpiu 33743050
abscmpui 33743066
mulri 38307400
mpexpo 38877822
absequaliu 39546019
absequalui 41296043
Mod4 43846243
itos_or_0 44911460
modsi 45242169
affui 45491529
Fl_div 46713845
stack_malloc 46923691
umodi2n 48988672
sdivsi_rem 51446784
gc_ulong 51670413
truedivii 54748090
stack_malloc_align 55537573
affrr_fixlg 56115211
gc_bool 56798890
absi_shallow 57784289
mod2 62589148
Fl_addmulmul_pre 64553372
minuu 69739630
remlll_pre 75667474
evalprecp 78670014
evalvalp 81626196
Fl_triple 87131384
mpsqr 91036238
Fl_sqr 99458441
addiu 99556566
addui 103631473
fixlg 105854832
mod2BIL 107446350
mpodd 116093162
icopyspec 118026905
subiu 133461219
real_1 133655386
subui 138438122
mpshift 153518745
togglesign_safe 157279228
dvmduBIL 163536967
itou 179080578
gc_double 184170403
shiftr 188188848
vali 191177658
addis 194760619
varncmp 199456642
gc_long 242669772
mpsub 249729315
utoineg 298130909
cgetineg 298991610
rtor 303783275
addsi 319946960
muliu 373332997
Fl_double 442138151
shiftr_inplace 466860396
mulis 467129364
itos 476323656
real_0_bit 482528634
addir 482874705
affsr 501377705
stor 501717228
mpadd 573061252
negi 641032709
itor 716890875
Fl_neg 729144568
umodsu 734144298
expu 797079430
stoi 799237880
lg2prec 815974554
mpmul 835396841
rcopy 916943917
mpneg 926919565
affii 964748660
subrr 1006474714
cmpuu 1490473456
cgetg_copy 1492136953
cgetr 1876038912
togglesign 1953804597
minss 2027642016
absi 2068912245
mpabs 2139849271
setabssign 2207130025
Fl_sqr_pre 2335165835
nbits2lg 2403074103
expi 2425424009
Fl_mul 2439041229
addrr 2931665021
remii 3062200859
adduu 3450741987
stackdummy 3688910850
Fl_mul_pre 4213276450
leafcopy 5063531949
shift_right 5731075071
Fl_add 6145469410
dvmdsBIL 7149424096
Fl_sub 7413203107
Fl_addmul_pre 7651564204
subii 7720458840
shift_left 7796892455
uutoi 8939037099
icopy 9156223952
maxss 9723316253
utoi 12053999031
addii 12532927379
evalexpo 13398045208
utoipos 14270338653
gc_const 15653749115
cgetipos 16455683291
cgetg 25530235158
cgeti 27490431258
new_chunk 95148714765
evallg 96893547076
set_avma 131381899689

Generated by: LCOV version 1.16