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 30672-116f3d5b0e) Lines: 605 680 89.0 %
Date: 2026-02-06 09:23:51 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 15547
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33709
cmprs 40996
cgetr_block 43832
sdivsi 102150
stack_calloc 110363
gc_stoi 155883
dvdui 167195
subis 170919
Fl_ellj_pre 238081
mod16 241108
mindd 264340
truedivis 266959
cmpri 282310
Mod32 311108
uutoineg 363006
Mod16 389733
cgetg_block 424899
gc_utoi 468564
dvdiu 576266
mpdiv 665634
cmpsr 796088
rdivss 839647
real2n 1067055
addri 1106272
gc_utoipos 1153475
real_0 1156524
equalis 1185542
equalsi 1185724
mpround 1216579
absrnz_equal2n 1292625
umodui 1296276
cmpss 1392943
Mod8 2074161
mpcmp 2226370
Mod2 2370311
udivuu_rem 2418330
gc_int 2631207
mulru 2765892
subir 3005091
equaliu 3018237
equalui 3018237
itou_or_0 3041724
maxdd 3178553
cmpis 3634874
negr 3671564
cmpsi 3866874
ceildivuu 3905121
Fl_center 4486195
absrnz_equal1 4519923
real_1_bit 4705051
maxuu 4814925
mod4 5084975
umuluu_or_0 5503471
umuluu_le 5803291
subsi 6094083
subri 6096231
truedivsi 6202031
affsi 6373354
mulrs 7181596
fractor 7376918
gc_NULL 7962335
cmpir 9449061
ugcdiu 10114046
cmpiu 10134497
cmpui 10134521
affectsign_safe 10727582
uabsdiviu_rem 11892741
addrs 12304931
smodss 12561274
rdivii 13104914
rdiviiz 13147999
mod8 13163240
mpabs_shallow 13428463
utor 13462005
affur 13462123
divii 14048839
subrs 16475728
dvdii 16562910
Fl_halve 18826138
modis 19638526
int_bit 20972528
smodis 21176060
evalvalser 21528999
hammingu 24048391
abscmpiu 33165851
abscmpui 33165993
mulri 38033772
mpexpo 38872133
absequaliu 39661582
absequalui 41410503
itos_or_0 43599658
Mod4 43795563
modsi 45225496
affui 45473824
Fl_div 46571754
stack_malloc 46625288
truedivii 47011831
umodi2n 48939207
sdivsi_rem 51429842
gc_bool 51986999
gc_ulong 52077679
affrr_fixlg 54653212
stack_malloc_align 55497413
absi_shallow 58214817
mod2 61113488
Fl_addmulmul_pre 64740907
minuu 68571742
remlll_pre 76043860
evalprecp 78663459
evalvalp 81621089
mpsqr 91030595
Fl_triple 95000520
Fl_sqr 95935609
addiu 97015947
addui 100660284
mod2BIL 103308252
fixlg 104196962
mpodd 115076589
icopyspec 117434108
togglesign_safe 125543222
real_1 129791650
subiu 131852552
subui 136825371
mpshift 153235394
dvmduBIL 165967369
shiftr 177976502
itou 178244743
addis 181605247
gc_double 184155909
vali 190383204
varncmp 217203090
gc_long 242460975
mpsub 251549005
utoineg 293983500
cgetineg 294845411
rtor 295253260
addsi 306791511
muliu 374675395
itos 462130295
shiftr_inplace 464367722
mulis 466281893
Fl_double 471229916
real_0_bit 481370700
addir 481418001
affsr 486128916
stor 486450708
mpadd 576280737
negi 636895042
itor 714924173
Fl_neg 724322756
umodsu 734205619
stoi 771296358
expu 775427063
lg2prec 799933747
mpmul 839509780
rcopy 903275916
affii 911103227
mpneg 916830483
subrr 1000211862
cgetg_copy 1480358804
cmpuu 1492946925
cgetr 1840434142
togglesign 1912737243
minss 2010420393
absi 2067449123
mpabs 2138260034
Fl_sqr_pre 2182039283
setabssign 2204961643
nbits2lg 2367871072
Fl_mul 2422712941
expi 2449062808
addrr 2880032864
remii 3008911853
adduu 3412414950
stackdummy 3646933246
Fl_mul_pre 4112428302
Fl_add 4416069519
leafcopy 4975864182
shift_right 5633999300
dvmdsBIL 7013050273
Fl_sub 7302038697
subii 7643127343
shift_left 7678215080
Fl_addmul_pre 7691292013
uutoi 8817963682
icopy 9054397917
maxss 9730524625
utoi 11906558534
addii 12411866363
evalexpo 13140754051
utoipos 14154804696
gc_const 15514223509
cgetipos 16324670893
cgetg 24572961877
cgeti 27100749599
new_chunk 93269709192
evallg 95244204361
set_avma 129043630308

Generated by: LCOV version 1.16