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 30831-19b50a36d0) Lines: 607 680 89.3 %
Date: 2026-04-20 09:27:00 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 44241
sdivsi 102150
stack_calloc 110704
gc_stoi 155905
dvdui 167195
subis 171739
Fl_ellj_pre 238053
mindd 264378
truedivis 268375
cmpri 302870
mod16 307025
Mod32 311108
uutoineg 362408
Mod16 389733
mpdiv 395374
cgetg_block 423644
gc_utoi 468747
dvdiu 576278
umodui 711392
cmpsr 796102
rdivss 839647
real2n 1068651
addri 1106188
equalis 1151329
equalsi 1151511
gc_utoipos 1153578
real_0 1157792
mpround 1216581
absrnz_equal2n 1301148
cmpss 1392943
Mod8 2073678
mpcmp 2156167
Mod2 2370028
udivuu_rem 2418379
gc_int 2739310
mulru 2765892
subir 3000029
equaliu 3021831
equalui 3021831
itou_or_0 3147012
maxdd 3211544
cmpis 3634404
negr 3683296
cmpsi 3866410
ceildivuu 3901917
Fl_center 4486079
absrnz_equal1 4556888
real_1_bit 4714136
mod4 5140468
subri 6090094
subsi 6184746
truedivsi 6202318
umuluu_or_0 6260588
affsi 6446227
maxuu 6611005
mulrs 7181596
fractor 7380431
umuluu_le 7617880
gc_NULL 7962470
cmpir 9446934
ugcdiu 10320754
affectsign_safe 10728615
uabsdiviu_rem 11892741
addrs 12364043
smodss 12534368
cmpui 12983981
cmpiu 12984223
rdivii 13107300
rdiviiz 13151597
mpabs_shallow 13428463
divii 14049330
utor 14266467
affur 14266567
mod8 15582559
subrs 16544350
dvdii 16903823
Fl_halve 18762491
modis 19638526
int_bit 20955126
smodis 21176088
hammingu 24048769
evalvalser 24359582
abscmpui 33351770
abscmpiu 33351870
mulri 38307239
mpexpo 38876119
absequaliu 39545703
absequalui 41295737
Mod4 43850680
itos_or_0 44912445
modsi 45242177
affui 45491532
Fl_div 46727272
stack_malloc 46923583
umodi2n 48993708
sdivsi_rem 51446791
gc_ulong 51670130
truedivii 54734850
stack_malloc_align 55535930
affrr_fixlg 56116151
gc_bool 56800209
absi_shallow 57393102
mod2 62590126
Fl_addmulmul_pre 64589569
minuu 69661246
remlll_pre 75645352
evalprecp 78672955
evalvalp 81629482
Fl_triple 87278033
mpsqr 90775727
addiu 98769331
Fl_sqr 99447711
addui 102844385
fixlg 105855889
mod2BIL 107442554
mpodd 116094215
icopyspec 118027118
subiu 133462397
real_1 133704926
subui 138439724
mpshift 153501731
togglesign_safe 157262267
dvmduBIL 165689793
itou 179080913
gc_double 184148225
shiftr 188188953
vali 191179079
addis 194781957
varncmp 199456634
gc_long 242672640
mpsub 249726054
utoineg 298128601
cgetineg 298989202
rtor 303778338
addsi 319968523
muliu 373344105
Fl_double 442387539
shiftr_inplace 467001714
mulis 467114765
itos 476311638
real_0_bit 482220489
addir 482819257
affsr 501391567
stor 501724848
mpadd 572642602
negi 641103861
itor 716835045
Fl_neg 729034265
umodsu 734142381
expu 797090521
stoi 799079839
lg2prec 815973008
mpmul 835389977
rcopy 916875426
mpneg 926985281
affii 965651926
subrr 1006461035
cmpuu 1490489583
cgetg_copy 1492131816
cgetr 1875894949
togglesign 1953989612
minss 2028120420
absi 2068951200
mpabs 2139883593
setabssign 2207191976
Fl_sqr_pre 2336676772
nbits2lg 2402989485
expi 2425844246
Fl_mul 2437307872
addrr 2931621402
remii 3062654985
adduu 3451700207
stackdummy 3688881669
Fl_mul_pre 4226091919
leafcopy 5064227593
shift_right 5731549781
Fl_add 6141826570
dvmdsBIL 7150494549
Fl_sub 7418291504
Fl_addmul_pre 7660451366
subii 7721584356
shift_left 7797591481
uutoi 8944281785
icopy 9157630261
maxss 9727310277
utoi 12059187090
addii 12537983494
evalexpo 13398743939
utoipos 14275982975
gc_const 15654608036
cgetipos 16459367739
cgetg 25530084601
cgeti 27500903406
new_chunk 95171389693
evallg 96908172221
set_avma 131417241535

Generated by: LCOV version 1.16