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 30734-f1f26dedcb) Lines: 605 680 89.0 %
Date: 2026-03-05 09:24:39 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4396603922
Fl_addmul_pre 7674887628
Fl_addmulmul_pre 64686562
Fl_center 4486087
Fl_div 46551805
Fl_double 453676928
Fl_ellj_pre 238061
Fl_halve 18819857
Fl_mul 2430774170
Fl_mul_pre 4085296484
Fl_neg 723614893
Fl_sqr 99489173
Fl_sqr_pre 2154164536
Fl_sub 7238050206
Fl_triple 91318899
Mod16 389733
Mod2 2370399
Mod32 311108
Mod4 43865521
Mod64 0
Mod8 2074317
abscmpiu 33353401
abscmpui 33353269
absequaliu 39352767
absequalui 41101680
absi 2065888792
absi_shallow 57319341
absr 140
absrnz_equal1 4520380
absrnz_equal2n 1292587
addii 12543340626
addir 481437906
addis 184531381
addiu 98666754
addri 1106255
addrr 2876828033
addrs 12305277
addsi 309718469
addss 24997
addui 102314320
adduu 3445609442
affectsign 0
affectsign_safe 10729317
affii 957515657
affrr_fixlg 54658023
affsi 6439561
affsr 486323277
affui 45473825
affur 13463158
ceildivuu 3903693
cgetg 24525161984
cgetg_block 425299
cgetg_copy 1487112573
cgeti 27271729297
cgetineg 297957227
cgetipos 16426578133
cgetr 1841044851
cgetr_block 43812
cmpir 9435976
cmpis 3633553
cmpiu 12181113
cmpri 282310
cmprs 40996
cmpsi 3865556
cmpsr 796109
cmpss 1392943
cmpui 12181205
cmpuu 1490468054
divii 14053737
divsi_rem 0
divss 0
divss_rem 0
dvdii 16904241
dvdiiz 0
dvdis 33730
dvdisz 0
dvdiu 576278
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7032971110
dvmdsi 0
dvmdss 0
dvmduBIL 161268049
equalis 1150998
equaliu 3018739
equalsi 1151204
equalui 3018740
evalexpo 13161019395
evallg 95357017632
evalprecp 78670932
evalvalp 81627467
evalvalser 21529069
expi 2420712262
expu 775784288
fixlg 104204652
fractor 7376939
gc_NULL 7962535
gc_bool 56145790
gc_const 15582029275
gc_double 184178990
gc_int 2631202
gc_long 242534576
gc_stoi 155905
gc_ulong 52066552
gc_utoi 468682
gc_utoipos 1153590
get_avma 0
hammingu 24048647
icopy 9056832663
icopyspec 117468652
int_bit 20973477
itor 715156652
itos 472284864
itos_or_0 43602527
itou 178237122
itou_or_0 3146878
leafcopy 4978227180
lg2prec 800190004
maxdd 3179616
maxss 9720466966
maxuu 4815557
mindd 264384
minss 2008366446
minuu 69637297
mod16 307021
mod2 61230882
mod2BIL 106069206
mod32 259
mod4 5139576
mod64 0
mod8 15580721
modis 19638526
modsi 45225691
modss 0
mpabs 2136726860
mpabs_shallow 13428463
mpadd 572882279
mpceil 0
mpcmp 2226346
mpcopy 665
mpdiv 665530
mpexpo 38874834
mpfloor 0
mpmul 836067555
mpneg 920348954
mpodd 115175743
mpround 1216578
mpshift 153301814
mpsqr 91027479
mpsub 251522424
mptrunc 49
mulis 467024610
muliu 375634919
mulri 38033998
mulrs 7181596
mulru 2765892
nbits2lg 2365755334
negi 640343697
negr 3671833
new_chunk 93555359871
rcopy 903492640
rdivii 13106169
rdiviiz 13148593
rdivis 0
rdivsi 0
rdivss 839647
real2n 1067465
real_0 1156646
real_0_bit 477683053
real_1 129859465
real_1_bit 4707063
real_m1 455
real_m2n 126
remii 3017725755
remis 0
remlll_pre 76376795
remsi 0
remss 0
rtor 295317811
sdivsi 102081
sdivsi_rem 51430039
sdivss_rem 0
set_avma 129523943556
setabssign 2203428626
shift_left 7695292412
shift_right 5634170529
shiftl 0
shiftlr 0
shiftr 178094163
shiftr_inplace 464619526
smodis 21176081
smodss 12677916
stack_calloc 110562
stack_calloc_align 3307
stack_malloc 46825762
stack_malloc_align 55524444
stackdummy 3654988149
stoi 796792645
stor 486630078
subii 7682088401
subir 3004972
subis 171670
subiu 131924729
subri 6078141
subrr 1000335080
subrs 16478270
subsi 6182979
subss 24997
subui 136899395
subuu 24997
thuemorseu 2851
togglesign 1943417281
togglesign_safe 157238077
truedivii 54714929
truedivis 266978
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 16693
udivuu_rem 2418379
ugcdiu 10147578
ugcdui 2737
umodi2n 49010085
umodsu 734177634
umodui 1291821
umuluu_le 5803291
umuluu_or_0 6129161
utoi 12047391278
utoineg 297096138
utoipos 14258252312
utor 13463044
uutoi 8934878183
uutoineg 364064
vali 190428287
varncmp 198513406
varnmax 203
varnmin 10374

Generated by: LCOV version 1.16