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

Generated by: LCOV version 1.16