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 30674-be81ecfdd4) Lines: 605 680 89.0 %
Date: 2026-02-13 09:23:38 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4415755534
Fl_addmul_pre 7692186220
Fl_addmulmul_pre 64658702
Fl_center 4486194
Fl_div 46547285
Fl_double 470845396
Fl_ellj_pre 238064
Fl_halve 18805639
Fl_mul 2422100292
Fl_mul_pre 4107360333
Fl_neg 724248645
Fl_sqr 95911520
Fl_sqr_pre 2180662505
Fl_sub 7275561030
Fl_triple 94873657
Mod16 389733
Mod2 2370240
Mod32 311108
Mod4 43798825
Mod64 0
Mod8 2074121
abscmpiu 32705879
abscmpui 32705984
absequaliu 39398240
absequalui 41147155
absi 2067555727
absi_shallow 57751351
absr 140
absrnz_equal1 4519853
absrnz_equal2n 1292593
addii 12411348777
addir 481445800
addis 181580495
addiu 96092276
addri 1106217
addrr 2878621991
addrs 12304815
addsi 306766116
addss 25067
addui 99736531
adduu 3411003765
affectsign 0
affectsign_safe 10726928
affii 910718357
affrr_fixlg 54653850
affsi 6373259
affsr 486140988
affui 45473822
affur 13462148
ceildivuu 3903905
cgetg 24564475371
cgetg_block 424931
cgetg_copy 1480354970
cgeti 27096551301
cgetineg 294848395
cgetipos 16321805824
cgetr 1840669278
cgetr_block 43835
cmpir 9431789
cmpis 3634916
cmpiu 10133586
cmpri 282310
cmprs 40996
cmpsi 3866915
cmpsr 796106
cmpss 1392943
cmpui 10133621
cmpuu 1492947816
divii 14055308
divsi_rem 0
divss 0
divss_rem 0
dvdii 16569704
dvdiiz 0
dvdis 33709
dvdisz 0
dvdiu 576268
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7014810870
dvmdsi 0
dvmdss 0
dvmduBIL 166064161
equalis 1185516
equaliu 3018233
equalsi 1185699
equalui 3018233
evalexpo 13142650213
evallg 95226872676
evalprecp 78671947
evalvalp 81629469
evalvalser 21528999
expi 2448757526
expu 775428484
fixlg 104196761
fractor 7376921
gc_NULL 7962716
gc_bool 51994821
gc_const 15513996647
gc_double 184160688
gc_int 2631187
gc_long 242459977
gc_stoi 155887
gc_ulong 52062967
gc_utoi 468599
gc_utoipos 1153487
get_avma 0
hammingu 24048420
icopy 9054690443
icopyspec 117434188
int_bit 20975362
itor 715078519
itos 462188440
itos_or_0 43600478
itou 178274925
itou_or_0 3041731
leafcopy 4975960807
lg2prec 800003610
maxdd 3178285
maxss 9705330476
maxuu 4815089
mindd 264337
minss 2010717121
minuu 69312949
mod16 241109
mod2 61112871
mod2BIL 103308305
mod32 259
mod4 5084874
mod64 0
mod8 13163619
modis 19638526
modsi 45225511
modss 0
mpabs 2138343253
mpabs_shallow 13428463
mpadd 574380743
mpceil 0
mpcmp 2226380
mpcopy 665
mpdiv 665647
mpexpo 38875326
mpfloor 0
mpmul 837675998
mpneg 916785428
mpodd 115075830
mpround 1216599
mpshift 153279004
mpsqr 91027926
mpsub 251586795
mptrunc 49
mulis 466294909
muliu 374613307
mulri 38033704
mulrs 7181596
mulru 2765892
nbits2lg 2366664327
negi 636827212
negr 3671484
new_chunk 93260654262
rcopy 903320184
rdivii 13105523
rdiviiz 13148803
rdivis 0
rdivsi 0
rdivss 839647
real2n 1067059
real_0 1156510
real_0_bit 479231447
real_1 129820914
real_1_bit 4704923
real_m1 455
real_m2n 126
remii 3008731297
remis 0
remlll_pre 76065660
remsi 0
remss 0
rtor 295253851
sdivsi 102147
sdivsi_rem 51429860
sdivss_rem 0
set_avma 129032063526
setabssign 2205052336
shift_left 7679192912
shift_right 5635712249
shiftl 0
shiftlr 0
shiftr 177982737
shiftr_inplace 464468906
smodis 21176060
smodss 12671491
stack_calloc 110379
stack_calloc_align 3307
stack_malloc 46625334
stack_malloc_align 55498545
stackdummy 3642228010
stoi 772808890
stor 486450537
subii 7641867783
subir 3005093
subis 170917
subiu 131852817
subri 6136599
subrr 1000315869
subrs 16475693
subsi 6094115
subss 25067
subui 136826058
subuu 25067
thuemorseu 2851
togglesign 1912719007
togglesign_safe 125549790
truedivii 47050531
truedivis 266947
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 16693
udivuu_rem 2418330
ugcdiu 10114284
ugcdui 2737
umodi2n 48942507
umodsu 734162514
umodui 1296276
umuluu_le 5803291
umuluu_or_0 5529732
utoi 11903924253
utoineg 293986727
utoipos 14152006859
utor 13462033
uutoi 8816038298
uutoineg 364197
vali 190382901
varncmp 217197812
varnmax 203
varnmin 14728

Generated by: LCOV version 1.16