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 30472-f680168c62) Lines: 605 680 89.0 %
Date: 2025-08-17 09:23:55 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
absr 140
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 2851
stack_calloc_align 3307
varnmin 15547
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33912
cmprs 40996
cgetr_block 43581
sdivsi 102149
stack_calloc 110135
gc_stoi 155882
dvdui 167195
subis 170993
mod16 236596
Fl_ellj_pre 242601
truedivis 266836
mindd 270151
cmpri 282310
Mod32 311108
uutoineg 355634
Mod16 389733
cgetg_block 393642
gc_utoi 468568
dvdiu 576571
mpdiv 667705
cmpsr 795905
rdivss 839647
real2n 1067403
addri 1109343
gc_utoipos 1153919
real_0 1156015
equalis 1181556
equalsi 1181738
mpround 1216536
absrnz_equal2n 1288793
umodui 1296416
cmpss 1427033
Mod8 2070208
mpcmp 2227481
udivuu_rem 2416391
Mod2 2479841
gc_int 2574362
mulru 2765822
equaliu 2995648
equalui 2995648
subir 3006680
itou_or_0 3054266
maxdd 3163860
cmpis 3633563
negr 3670251
ceildivuu 3848405
cmpsi 3865534
Fl_center 4485592
absrnz_equal1 4515823
mod4 4700808
real_1_bit 4705774
maxuu 4805142
umuluu_or_0 5548528
umuluu_le 5800680
subsi 6112162
subri 6132646
truedivsi 6202031
affsi 6383075
mulrs 7181596
fractor 7376320
gc_NULL 7968255
cmpir 9430459
ugcdiu 10086307
cmpui 10116190
cmpiu 10116360
affectsign_safe 10735916
uabsdiviu_rem 11892741
addrs 12304895
smodss 12495247
rdivii 13100897
rdiviiz 13145111
mod8 13272775
mpabs_shallow 13428463
utor 13460176
affur 13460294
divii 14059143
subrs 16476490
dvdii 16481812
Fl_halve 18023406
modis 19638518
smodis 21176255
evalvalser 21443044
int_bit 22269742
hammingu 24045784
abscmpiu 32378880
abscmpui 32379048
mulri 38034263
mpexpo 38857501
absequaliu 39649969
absequalui 41398869
itos_or_0 43920399
Mod4 44349233
modsi 45225528
affui 45473825
Fl_div 46477356
stack_malloc 46631551
truedivii 46821028
umodi2n 49600114
sdivsi_rem 51429857
gc_bool 51919019
gc_ulong 52172014
stack_malloc_align 55490689
affrr_fixlg 55795859
absi_shallow 57430714
Fl_addmulmul_pre 60044319
mod2 61147638
minuu 69084969
remlll_pre 75464610
evalprecp 78666681
evalvalp 81623416
mpsqr 90979146
Fl_sqr 94824856
addiu 95145069
Fl_triple 95543916
addui 98794401
mod2BIL 103333393
fixlg 105291112
mpodd 115078118
icopyspec 116532293
togglesign_safe 125527155
real_1 131223014
subiu 131650165
subui 136343897
mpshift 153199330
dvmduBIL 165680129
itou 177063767
shiftr 180840107
addis 181719029
gc_double 184447727
vali 190293436
varncmp 217201212
gc_long 241793722
mpsub 251545126
utoineg 294209739
cgetineg 295067344
rtor 300456685
addsi 306902970
muliu 372566741
itos 461735579
mulis 465459515
Fl_double 474073448
shiftr_inplace 478352089
real_0_bit 478519008
addir 479726009
affsr 495308336
stor 495620021
mpadd 574357775
negi 637440980
itor 713082419
Fl_neg 716434990
umodsu 724198672
stoi 772833931
expu 786959764
lg2prec 807039495
mpmul 837450130
rcopy 905591981
affii 908937818
mpneg 917837473
subrr 1001011179
cgetg_copy 1479707415
cmpuu 1492924519
cgetr 1856851904
togglesign 1914574348
minss 2008859771
absi 2060393597
mpabs 2131637029
Fl_sqr_pre 2162622393
setabssign 2198314818
nbits2lg 2380780150
Fl_mul 2413288282
expi 2454019962
addrr 2881560438
remii 3011260235
adduu 3410164957
stackdummy 3639415438
Fl_mul_pre 4078238446
Fl_add 4357621740
leafcopy 4968937474
shift_right 5671358333
dvmdsBIL 7086327493
Fl_sub 7283370685
Fl_addmul_pre 7646317575
subii 7664369422
shift_left 7752443263
uutoi 8810330851
icopy 9055108137
maxss 9718380281
utoi 11900959869
addii 12407252178
evalexpo 13258781185
utoipos 14148551971
gc_const 15514729843
cgetipos 16315490542
cgetg 24651390765
cgeti 27125666749
new_chunk 93427722137
evallg 95433345826
set_avma 129263278716

Generated by: LCOV version 1.16