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 30838-aa3635ec72) Lines: 605 680 89.0 %
Date: 2026-04-28 09:25:50 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 44071
sdivsi 102149
stack_calloc 110694
gc_stoi 155894
dvdui 167195
subis 171738
Fl_ellj_pre 238056
mindd 264378
truedivis 268379
cmpri 302870
mod16 307029
Mod32 311108
uutoineg 362007
Mod16 389733
mpdiv 395375
cgetg_block 424576
gc_utoi 468789
dvdiu 576273
umodui 711391
cmpsr 796120
rdivss 839647
real2n 1068652
addri 1106207
equalis 1151283
equalsi 1151466
gc_utoipos 1153596
real_0 1157750
mpround 1216584
absrnz_equal2n 1301169
cmpss 1392943
Mod8 2073657
mpcmp 2156128
Mod2 2370100
udivuu_rem 2418379
gc_int 2739284
mulru 2765892
subir 3000050
equaliu 3021851
equalui 3021851
itou_or_0 3146265
maxdd 3211489
cmpis 3634466
negr 3682885
cmpsi 3866466
ceildivuu 3902664
Fl_center 4486068
absrnz_equal1 4556945
real_1_bit 4714239
mod4 5140496
subri 6085430
subsi 6184867
truedivsi 6202318
umuluu_or_0 6273716
affsi 6446294
maxuu 6610589
mulrs 7181596
fractor 7379552
umuluu_le 7617880
gc_NULL 7961622
cmpir 9444212
ugcdiu 10320158
affectsign_safe 10728768
uabsdiviu_rem 11892741
addrs 12363984
smodss 12475187
cmpiu 12970361
cmpui 12970548
rdivii 13101093
rdiviiz 13147589
mpabs_shallow 13428463
divii 14044021
utor 14266104
affur 14266150
mod8 15586424
subrs 16544274
dvdii 16899449
Fl_halve 18752929
modis 19638526
int_bit 20938224
smodis 21176102
hammingu 24048798
evalvalser 24359743
abscmpiu 32017353
abscmpui 32017419
mulri 38306694
mpexpo 38875171
absequaliu 39545937
absequalui 41295949
Mod4 43835580
itos_or_0 44911034
modsi 45242134
affui 45491529
Fl_div 46721207
stack_malloc 46923539
umodi2n 48978273
sdivsi_rem 51446749
gc_ulong 51687431
truedivii 54723202
stack_malloc_align 55535081
absi_shallow 56061098
affrr_fixlg 56115238
gc_bool 56791184
mod2 62590284
Fl_addmulmul_pre 64583635
minuu 69588193
remlll_pre 75678434
evalprecp 78665618
evalvalp 81623171
Fl_triple 86962215
mpsqr 90770952
addiu 96088301
Fl_sqr 99479385
addui 100161510
fixlg 105854556
mod2BIL 107445305
mpodd 116094534
icopyspec 118026428
subiu 133445176
real_1 133704548
subui 138422291
mpshift 153463095
togglesign_safe 157260599
dvmduBIL 165653334
itou 179080952
gc_double 184142826
shiftr 188182618
vali 191177093
addis 194739863
varncmp 199456863
gc_long 242672956
mpsub 249713621
utoineg 298127898
cgetineg 298988530
rtor 303771960
addsi 319923490
muliu 373198289
Fl_double 440773052
shiftr_inplace 466995076
mulis 467112777
itos 476299665
real_0_bit 482159665
addir 482784939
affsr 501296162
stor 501658423
mpadd 572558974
negi 641022596
itor 716816119
Fl_neg 729039079
umodsu 734165986
expu 797030228
stoi 798915713
lg2prec 815840995
mpmul 835280090
rcopy 916793846
mpneg 926901180
affii 964696651
subrr 1006485608
cmpuu 1490529937
cgetg_copy 1492148411
cgetr 1875840292
togglesign 1953627293
minss 2027396234
absi 2069052530
mpabs 2139990814
setabssign 2207288943
Fl_sqr_pre 2331075809
nbits2lg 2403135503
expi 2425151035
Fl_mul 2434317490
addrr 2931392385
remii 3061200723
adduu 3446368830
stackdummy 3680486378
Fl_mul_pre 4205629615
leafcopy 5064277736
shift_right 5731717079
Fl_add 6106784655
dvmdsBIL 7149725230
Fl_sub 7374369118
Fl_addmul_pre 7644711073
subii 7718664007
shift_left 7797386236
uutoi 8925811046
icopy 9154274308
maxss 9683294800
utoi 12040763582
addii 12530665414
evalexpo 13391544762
utoipos 14255928846
gc_const 15654812888
cgetipos 16437311591
cgetg 25505719665
cgeti 27464731836
new_chunk 95108207163
evallg 96813053315
set_avma 131321045185

Generated by: LCOV version 1.16