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 30617-dd5c93fb0e) Lines: 605 680 89.0 %
Date: 2026-01-20 09:21:06 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 43583
sdivsi 102145
stack_calloc 110351
gc_stoi 155880
dvdui 167195
subis 170914
Fl_ellj_pre 238036
mod16 241108
mindd 264340
truedivis 266949
cmpri 282310
Mod32 311108
uutoineg 361995
Mod16 389733
cgetg_block 407200
gc_utoi 468647
dvdiu 576262
mpdiv 665647
cmpsr 796101
rdivss 839647
real2n 1067006
addri 1105768
gc_utoipos 1153465
real_0 1156404
equalis 1185624
equalsi 1185806
mpround 1216575
absrnz_equal2n 1292608
umodui 1296276
cmpss 1379853
Mod8 2073917
mpcmp 2225910
Mod2 2370262
udivuu_rem 2416412
gc_int 2631174
mulru 2765892
subir 3005086
equaliu 3018191
equalui 3018192
itou_or_0 3041717
maxdd 3178605
cmpis 3634893
negr 3670767
cmpsi 3866894
ceildivuu 3903463
Fl_center 4486048
absrnz_equal1 4519876
real_1_bit 4704767
maxuu 4814915
mod4 5084158
umuluu_or_0 5538758
umuluu_le 5803291
subsi 6093478
subri 6096865
truedivsi 6202031
affsi 6373059
mulrs 7181596
fractor 7376752
gc_NULL 7961405
cmpir 9447050
ugcdiu 10113582
cmpui 10132294
cmpiu 10132432
affectsign_safe 10727614
uabsdiviu_rem 11892741
addrs 12305200
smodss 12460994
rdivii 13099681
rdiviiz 13145666
mod8 13163670
mpabs_shallow 13428463
utor 13461365
affur 13461482
divii 14035862
subrs 16475576
dvdii 16566863
Fl_halve 18753483
modis 19638526
int_bit 20940770
smodis 21176060
evalvalser 21527935
hammingu 24048478
abscmpiu 32071997
abscmpui 32072042
mulri 38033693
mpexpo 38872061
absequaliu 39660819
absequalui 41409743
itos_or_0 43598087
Mod4 43766197
modsi 45225532
affui 45473825
Fl_div 46447625
stack_malloc 46626984
truedivii 47022012
umodi2n 48909918
sdivsi_rem 51429859
gc_bool 51987977
gc_ulong 52047878
affrr_fixlg 54651746
stack_malloc_align 55496535
absi_shallow 57123737
mod2 61112884
Fl_addmulmul_pre 64479810
minuu 69260966
remlll_pre 75563934
evalprecp 78659704
evalvalp 81616360
mpsqr 91024344
Fl_triple 93855962
addiu 94817092
Fl_sqr 95827126
addui 98461047
mod2BIL 103303636
fixlg 104194583
mpodd 115076291
icopyspec 117423961
togglesign_safe 125524291
real_1 129788725
subiu 131841430
subui 136814351
mpshift 153146206
dvmduBIL 165614973
shiftr 177960652
itou 178232840
addis 181561822
gc_double 184094384
vali 190376335
varncmp 217203100
gc_long 242310954
mpsub 251523103
utoineg 293946373
cgetineg 294807657
rtor 295230723
addsi 306744802
muliu 374379212
itos 462128951
shiftr_inplace 463994903
Fl_double 466099333
mulis 466265195
real_0_bit 480994348
addir 481351561
affsr 486006708
stor 486331035
mpadd 575971110
negi 636788887
itor 714580631
Fl_neg 719107891
umodsu 723942396
stoi 772792216
expu 775220745
lg2prec 799541823
mpmul 839082001
rcopy 903031939
affii 910031842
mpneg 916697612
subrr 1000051378
cgetg_copy 1480053168
cmpuu 1492598350
cgetr 1839827535
togglesign 1911760849
minss 2008845557
absi 2068266537
mpabs 2139061439
Fl_sqr_pre 2165068735
setabssign 2205761234
nbits2lg 2367498278
Fl_mul 2417503597
expi 2448055294
addrr 2877510167
remii 3004064644
adduu 3407500693
stackdummy 3635517005
Fl_mul_pre 4067512572
Fl_add 4360109103
leafcopy 4973214282
shift_right 5626736861
dvmdsBIL 7006259870
Fl_sub 7236000496
Fl_addmul_pre 7641104257
subii 7654630690
shift_left 7675492860
uutoi 8799033215
icopy 9050848310
maxss 9678312788
utoi 11888133662
addii 12397912181
evalexpo 13129690459
utoipos 14131419271
gc_const 15506472717
cgetipos 16293489495
cgetg 24520196004
cgeti 27076550389
new_chunk 93174888206
evallg 95127274913
set_avma 128890280408

Generated by: LCOV version 1.16