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 30773-2078653b96) Lines: 605 680 89.0 %
Date: 2026-03-31 09:27:24 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 19040
addss 25067
subss 25067
subuu 25067
dvdis 33737
cmprs 40996
cgetr_block 44310
sdivsi 102150
stack_calloc 110693
gc_stoi 155904
dvdui 167195
subis 171739
Fl_ellj_pre 238061
mindd 264380
truedivis 268384
cmpri 284263
mod16 307028
Mod32 311108
uutoineg 362470
Mod16 389733
cgetg_block 426422
gc_utoi 468683
dvdiu 576273
mpdiv 665535
umodui 711392
cmpsr 796100
rdivss 839647
real2n 1068598
addri 1106262
equalis 1151202
equalsi 1151384
gc_utoipos 1153572
real_0 1157744
mpround 1216579
absrnz_equal2n 1300282
cmpss 1392943
Mod8 2074100
mpcmp 2226353
Mod2 2370280
udivuu_rem 2418379
gc_int 2742589
mulru 2765892
subir 3004970
equaliu 3021725
equalui 3021725
itou_or_0 3147016
maxdd 3211483
cmpis 3634541
negr 3682521
cmpsi 3866540
ceildivuu 3901660
Fl_center 4486162
absrnz_equal1 4553808
real_1_bit 4713978
mod4 5141106
subri 6060182
subsi 6184623
truedivsi 6202031
umuluu_or_0 6277858
affsi 6445992
maxuu 6611085
mulrs 7181596
fractor 7379020
umuluu_le 7617880
gc_NULL 7962162
cmpir 9460238
ugcdiu 10320852
affectsign_safe 10728469
uabsdiviu_rem 11892741
addrs 12360808
smodss 12434574
cmpui 12978704
cmpiu 12978842
rdivii 13105842
rdiviiz 13149389
mpabs_shallow 13428463
divii 14039768
utor 14335135
affur 14335229
mod8 15585441
subrs 16536049
dvdii 16891741
Fl_halve 18767777
modis 19638526
int_bit 20950559
smodis 21176088
hammingu 24048663
evalvalser 24359582
abscmpiu 33108512
abscmpui 33108675
mulri 38284538
mpexpo 38873237
absequaliu 39547068
absequalui 41297086
Mod4 43849013
itos_or_0 44911095
modsi 45242165
affui 45491530
Fl_div 46807898
stack_malloc 46928661
umodi2n 48992136
sdivsi_rem 51446492
gc_ulong 52055752
truedivii 54705034
stack_malloc_align 55532679
affrr_fixlg 56106583
gc_bool 56764302
absi_shallow 57163244
mod2 62590032
Fl_addmulmul_pre 64634139
minuu 69591243
remlll_pre 75622515
evalprecp 78669806
evalvalp 81626603
Fl_triple 87241313
mpsqr 91033180
addiu 98287341
Fl_sqr 99447009
addui 102362387
fixlg 105717431
mod2BIL 107448973
mpodd 116093813
icopyspec 117797870
subiu 133394569
real_1 133612780
subui 138370282
mpshift 153491446
togglesign_safe 157268688
dvmduBIL 165698903
itou 179081457
gc_double 184143502
shiftr 187924615
vali 190834533
addis 194716632
varncmp 198759677
gc_long 242624942
mpsub 251556314
utoineg 297813269
cgetineg 298673816
rtor 303762401
addsi 319903003
muliu 373345053
Fl_double 442372369
shiftr_inplace 467083589
mulis 467127960
itos 476262958
addir 483037061
real_0_bit 484410978
affsr 501204025
stor 501603435
mpadd 574778114
negi 640856874
itor 716658384
Fl_neg 729213567
umodsu 734132807
expu 796833505
stoi 798864749
lg2prec 815663882
mpmul 838922660
rcopy 916755350
mpneg 926493908
affii 964031805
subrr 1006262771
cgetg_copy 1490119308
cmpuu 1490445541
cgetr 1875609080
togglesign 1953428883
minss 2025834791
absi 2066941733
mpabs 2137915310
setabssign 2204984142
Fl_sqr_pre 2337848512
nbits2lg 2404396994
expi 2424415181
Fl_mul 2439928143
addrr 2933263017
remii 3060925110
adduu 3447640444
stackdummy 3685988739
Fl_mul_pre 4223003714
leafcopy 5061561793
shift_right 5732772559
Fl_add 6154435735
dvmdsBIL 7149191331
Fl_sub 7397740213
Fl_addmul_pre 7669321358
subii 7718258396
shift_left 7795153523
uutoi 8932642059
icopy 9150737482
maxss 9706578123
utoi 12047667887
addii 12531480270
evalexpo 13393074907
utoipos 14265085150
gc_const 15648411197
cgetipos 16455146423
cgetg 25534727753
cgeti 27467497013
new_chunk 95132483187
evallg 96851212480
set_avma 131356583703

Generated by: LCOV version 1.16