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 30851-7844d7b3a5) Lines: 605 680 89.0 %
Date: 2026-05-03 09:26:29 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 33751
cmprs 40996
cgetr_block 44249
sdivsi 102150
stack_calloc 110674
gc_stoi 155896
dvdui 167195
subis 171739
Fl_ellj_pre 238072
mindd 264382
truedivis 268361
cmpri 303003
mod16 307029
Mod32 311108
uutoineg 362734
Mod16 389733
mpdiv 395508
cgetg_block 424600
gc_utoi 468731
dvdiu 576274
umodui 711392
cmpsr 796106
rdivss 839647
real2n 1068678
addri 1111504
equalis 1151375
equalsi 1151557
gc_utoipos 1153599
real_0 1159245
mpround 1216581
absrnz_equal2n 1301130
cmpss 1392943
Mod8 2073892
mpcmp 2161434
Mod2 2370301
udivuu_rem 2418379
gc_int 2739553
mulru 2765892
subir 3000327
equalui 3021950
equaliu 3021951
itou_or_0 3146595
maxdd 3211809
cmpis 3634533
negr 3683108
cmpsi 3866532
ceildivuu 3903866
Fl_center 4489146
absrnz_equal1 4556936
real_1_bit 4714507
mod4 5141281
subri 6105718
subsi 6184822
truedivsi 6202318
umuluu_or_0 6262502
affsi 6447530
maxuu 6611289
mulrs 7181596
fractor 7379555
umuluu_le 7617880
gc_NULL 7963922
cmpir 9449835
ugcdiu 10320356
affectsign_safe 10729279
uabsdiviu_rem 11892741
addrs 12364499
smodss 12500085
cmpiu 12968972
cmpui 12969045
rdivii 13105153
rdiviiz 13151643
mpabs_shallow 13428463
divii 14052530
utor 14267988
affur 14268098
mod8 15584283
subrs 16544901
dvdii 16905769
Fl_halve 18768231
modis 19638526
int_bit 20948021
smodis 21176102
hammingu 24048705
evalvalser 24359743
abscmpui 32359248
abscmpiu 32359270
mulri 38306363
mpexpo 38879707
absequaliu 39546377
absequalui 41296396
Mod4 43859591
itos_or_0 44912306
modsi 45242111
affui 45491533
Fl_div 46810765
stack_malloc 46929460
umodi2n 49003140
sdivsi_rem 51446725
gc_ulong 51684977
truedivii 54740441
stack_malloc_align 55542942
affrr_fixlg 56116687
absi_shallow 56411111
gc_bool 56821100
mod2 62589542
Fl_addmulmul_pre 64532135
minuu 69758896
remlll_pre 75587288
evalprecp 78670750
evalvalp 81627319
Fl_triple 87317277
mpsqr 90787804
addiu 96771557
Fl_sqr 99476735
addui 100844997
fixlg 105866340
mod2BIL 107444985
mpodd 116093416
icopyspec 118072309
subiu 133450273
real_1 133721458
subui 138427592
mpshift 153490003
togglesign_safe 157307743
dvmduBIL 163601685
itou 179087719
gc_double 184179594
shiftr 188197450
vali 191296121
addis 194775906
varncmp 199680323
gc_long 242690988
mpsub 249788089
utoineg 298260937
cgetineg 299120404
rtor 303792317
addsi 319963982
muliu 373404751
Fl_double 442807768
shiftr_inplace 466939753
mulis 467097808
itos 476335781
real_0_bit 482255325
addir 482847435
affsr 501408667
stor 501719846
mpadd 572712040
negi 641075591
itor 717002042
Fl_neg 729128327
umodsu 734148756
expu 797161751
stoi 799295558
lg2prec 815998323
mpmul 835534378
rcopy 916970382
mpneg 926966189
affii 964984192
subrr 1006561505
cmpuu 1489922928
cgetg_copy 1493225095
cgetr 1876165990
togglesign 1954330585
minss 2027984581
absi 2070318730
mpabs 2141276535
setabssign 2208679025
Fl_sqr_pre 2336322548
nbits2lg 2403244647
expi 2426008949
Fl_mul 2436245728
addrr 2931778924
remii 3061511162
adduu 3448196137
stackdummy 3683880675
Fl_mul_pre 4220541081
leafcopy 5065404221
shift_right 5733479811
Fl_add 6150123396
dvmdsBIL 7150874223
Fl_sub 7390686436
Fl_addmul_pre 7664606232
subii 7718887613
shift_left 7798582734
uutoi 8936774474
icopy 9156875067
maxss 9693928154
utoi 12051934040
addii 12534021883
evalexpo 13395402756
utoipos 14268600007
gc_const 15656733374
cgetipos 16451257066
cgetg 25523504179
cgeti 27479448602
new_chunk 95148063766
evallg 96870392663
set_avma 131376902744

Generated by: LCOV version 1.16