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

Generated by: LCOV version 1.16