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 30605-980f9eb85c) Lines: 605 680 89.0 %
Date: 2026-01-12 09:21:57 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 43808
sdivsi 102148
stack_calloc 110347
gc_stoi 155884
dvdui 167195
subis 170917
Fl_ellj_pre 238061
mod16 241110
mindd 264339
truedivis 266945
cmpri 282310
Mod32 311108
uutoineg 361994
Mod16 389733
cgetg_block 407171
gc_utoi 468510
dvdiu 576271
mpdiv 665613
cmpsr 796108
rdivss 839647
real2n 1067002
addri 1105706
gc_utoipos 1153483
real_0 1156427
equalis 1185452
equalsi 1185635
mpround 1216582
absrnz_equal2n 1292572
umodui 1296276
cmpss 1379853
Mod8 2073944
mpcmp 2225824
Mod2 2370195
udivuu_rem 2416412
gc_int 2631167
mulru 2765892
subir 3005106
equaliu 3018191
equalui 3018194
itou_or_0 3041715
maxdd 3178356
cmpis 3634871
negr 3671382
cmpsi 3866870
ceildivuu 3902649
Fl_center 4486070
absrnz_equal1 4519861
real_1_bit 4704574
maxuu 4815025
mod4 5083922
umuluu_or_0 5520396
umuluu_le 5803291
subsi 6093489
subri 6119840
truedivsi 6202031
affsi 6372912
mulrs 7181596
fractor 7376775
gc_NULL 7961469
cmpir 9428222
ugcdiu 10114308
cmpiu 10132816
cmpui 10132843
affectsign_safe 10728727
uabsdiviu_rem 11892741
addrs 12304734
smodss 12485501
rdivii 13102474
rdiviiz 13145726
mod8 13163239
mpabs_shallow 13428463
utor 13461713
affur 13461824
divii 14044118
subrs 16475268
dvdii 16559109
Fl_halve 18783677
modis 19638526
int_bit 20947080
smodis 21176060
evalvalser 21527935
hammingu 24048396
abscmpiu 32073713
abscmpui 32073867
mulri 38033605
mpexpo 38872978
absequaliu 39660941
absequalui 41409748
itos_or_0 43599819
Mod4 43777121
modsi 45225511
affui 45473825
Fl_div 46533505
stack_malloc 46627043
truedivii 47031173
umodi2n 48921068
sdivsi_rem 51429838
gc_bool 51981838
gc_ulong 52067700
affrr_fixlg 54652893
stack_malloc_align 55495662
absi_shallow 57123623
mod2 61112547
Fl_addmulmul_pre 64571061
minuu 69243647
remlll_pre 75780331
evalprecp 78663528
evalvalp 81620884
mpsqr 91013282
Fl_triple 94388225
addiu 94829894
Fl_sqr 95818466
addui 98473790
mod2BIL 103303152
fixlg 104196313
mpodd 115075309
icopyspec 117424813
togglesign_safe 125533067
real_1 129802857
subiu 131843296
subui 136816240
mpshift 153176636
dvmduBIL 165732863
shiftr 177966905
itou 178232858
addis 181530317
gc_double 184101504
vali 190376842
varncmp 217203152
gc_long 242315059
mpsub 251514048
utoineg 293946441
cgetineg 294808436
rtor 295236484
addsi 306714931
muliu 374419778
itos 462150732
shiftr_inplace 464272739
mulis 466274498
Fl_double 468712432
real_0_bit 478916037
addir 481413515
affsr 486084900
stor 486453842
mpadd 574094818
negi 636787182
itor 714760088
Fl_neg 719268159
umodsu 723946359
stoi 772677222
expu 775364495
lg2prec 799861212
mpmul 837227045
rcopy 903176756
affii 910202822
mpneg 916695110
subrr 1000059170
cgetg_copy 1480037717
cmpuu 1492603668
cgetr 1840059895
togglesign 1912046455
minss 2009442095
absi 2068381717
mpabs 2139149699
Fl_sqr_pre 2173416413
setabssign 2205880976
nbits2lg 2365550659
Fl_mul 2417107458
expi 2448332284
addrr 2876724212
remii 3004494387
adduu 3407838785
stackdummy 3636509106
Fl_mul_pre 4091946093
Fl_add 4396222785
leafcopy 4973653877
shift_right 5631604894
dvmdsBIL 7009656091
Fl_sub 7255822308
subii 7653997275
Fl_addmul_pre 7667989509
shift_left 7675445572
uutoi 8807290813
icopy 9052173333
maxss 9691190825
utoi 11895585435
addii 12403616788
evalexpo 13132927470
utoipos 14143118933
gc_const 15508794035
cgetipos 16307813685
cgetg 24539092244
cgeti 27086184896
new_chunk 93200336592
evallg 95175340022
set_avma 128952405311

Generated by: LCOV version 1.16