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 30773-2078653b96) Lines: 605 680 89.0 %
Date: 2026-03-30 09:27:24 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 6158739582
Fl_addmul_pre 7660803252
Fl_addmulmul_pre 64648823
Fl_center 4486119
Fl_div 46817598
Fl_double 443040718
Fl_ellj_pre 238057
Fl_halve 18780815
Fl_mul 2437881803
Fl_mul_pre 4224866155
Fl_neg 729179806
Fl_sqr 99479304
Fl_sqr_pre 2339977151
Fl_sub 7386495147
Fl_triple 87422166
Mod16 389733
Mod2 2370258
Mod32 311108
Mod4 43853162
Mod64 0
Mod8 2073988
abscmpiu 32331637
abscmpui 32331797
absequaliu 39546799
absequalui 41296805
absi 2067004513
absi_shallow 56386261
absr 19040
absrnz_equal1 4553864
absrnz_equal2n 1300265
addii 12532293547
addir 483073500
addis 194692984
addiu 96729966
addri 1106218
addrr 2931383659
addrs 12361204
addsi 319879550
addss 25067
addui 100805003
adduu 3446736472
affectsign 0
affectsign_safe 10730562
affii 964346295
affrr_fixlg 56108009
affsi 6446155
affsr 501171539
affui 45491528
affur 14335242
ceildivuu 3903817
cgetg 25522159143
cgetg_block 426416
cgetg_copy 1490172190
cgeti 27468212977
cgetineg 298674412
cgetipos 16454943356
cgetr 1875803372
cgetr_block 44308
cmpir 9444916
cmpis 3634525
cmpiu 12979488
cmpri 284263
cmprs 40996
cmpsi 3866523
cmpsr 796103
cmpss 1392943
cmpui 12979367
cmpuu 1490478930
divii 14053918
divsi_rem 0
divss 0
divss_rem 0
dvdii 16888491
dvdiiz 0
dvdis 33737
dvdisz 0
dvdiu 576277
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7149461284
dvmdsi 0
dvmdss 0
dvmduBIL 165658910
equalis 1151307
equaliu 3021724
equalsi 1151489
equalui 3021724
evalexpo 13390502928
evallg 96832994444
evalprecp 78670684
evalvalp 81627565
evalvalser 24359582
expi 2424608872
expu 796830852
fixlg 105718885
fractor 7379028
gc_NULL 7961417
gc_bool 56763328
gc_const 15648089282
gc_double 184193141
gc_int 2742604
gc_long 242625924
gc_stoi 155903
gc_ulong 52093257
gc_utoi 468761
gc_utoipos 1153585
get_avma 0
hammingu 24048677
icopy 9151356348
icopyspec 117797905
int_bit 20951827
itor 716766824
itos 476301947
itos_or_0 44910772
itou 179081683
itou_or_0 3147011
leafcopy 5061686927
lg2prec 815655481
maxdd 3211686
maxss 9694775222
maxuu 6610949
mindd 264381
minss 2026016632
minuu 69621032
mod16 307025
mod2 62590044
mod2BIL 107446705
mod32 259
mod4 5141181
mod64 0
mod8 15584741
modis 19638526
modsi 45242166
modss 0
mpabs 2137958346
mpabs_shallow 13428463
mpadd 572827629
mpceil 0
mpcmp 2226413
mpcopy 665
mpdiv 665519
mpexpo 38880908
mpfloor 0
mpmul 837025123
mpneg 926470905
mpodd 116094359
mpround 1216579
mpshift 153491293
mpsqr 91042466
mpsub 251633310
mptrunc 49
mulis 467096517
muliu 373309060
mulri 38284520
mulrs 7181596
mulru 2765892
nbits2lg 2402645769
negi 640823468
negr 3682492
new_chunk 95111936878
rcopy 916842289
rdivii 13106221
rdiviiz 13149693
rdivis 0
rdivsi 0
rdivss 839647
real2n 1068596
real_0 1157740
real_0_bit 482117638
real_1 133647242
real_1_bit 4714013
real_m1 455
real_m2n 126
remii 3061007837
remis 0
remlll_pre 75638420
remsi 0
remss 0
rtor 303765251
sdivsi 102149
sdivsi_rem 51446493
sdivss_rem 0
set_avma 131324898001
setabssign 2205028952
shift_left 7795358809
shift_right 5732801907
shiftl 0
shiftlr 0
shiftr 187935280
shiftr_inplace 467105523
smodis 21176088
smodss 12440828
stack_calloc 110689
stack_calloc_align 3325
stack_malloc 46928880
stack_malloc_align 55540113
stackdummy 3681754833
stoi 798906342
stor 501588152
subii 7718635520
subir 3004972
subis 171738
subiu 133398736
subri 6107473
subrr 1006375618
subrs 16536541
subsi 6184450
subss 25067
subui 138374615
subuu 25067
thuemorseu 3313
togglesign 1953454865
togglesign_safe 157270320
truedivii 54733303
truedivis 268368
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 16693
udivuu_rem 2418379
ugcdiu 10320081
ugcdui 2737
umodi2n 48996266
umodsu 734174650
umodui 711392
umuluu_le 7617880
umuluu_or_0 6287697
utoi 12047142662
utoineg 297813778
utoipos 14264687374
utor 14335134
uutoi 8933413202
uutoineg 362655
vali 190833776
varncmp 198759977
varnmax 203
varnmin 10374

Generated by: LCOV version 1.16