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 30657-d14c2a9e4e) Lines: 605 680 89.0 %
Date: 2026-01-29 09:23:20 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 43795
sdivsi 102148
stack_calloc 110355
gc_stoi 155882
dvdui 167195
subis 170917
Fl_ellj_pre 238046
mod16 241107
mindd 264340
truedivis 266946
cmpri 282310
Mod32 311108
uutoineg 362538
Mod16 389733
cgetg_block 424865
gc_utoi 468551
dvdiu 576268
mpdiv 665629
cmpsr 796104
rdivss 839647
real2n 1067045
addri 1106267
gc_utoipos 1153485
real_0 1156515
equalis 1185595
equalsi 1185777
mpround 1216582
absrnz_equal2n 1292611
umodui 1296276
cmpss 1392943
Mod8 2074067
mpcmp 2226412
Mod2 2370153
udivuu_rem 2416412
gc_int 2631169
mulru 2765892
subir 3005070
equaliu 3018245
equalui 3018245
itou_or_0 3041720
maxdd 3178519
cmpis 3634887
negr 3671436
cmpsi 3866885
ceildivuu 3899685
Fl_center 4486075
absrnz_equal1 4519891
real_1_bit 4704883
maxuu 4814991
mod4 5083897
umuluu_or_0 5507271
umuluu_le 5803291
subsi 6093497
subri 6131372
truedivsi 6202031
affsi 6373085
mulrs 7181596
fractor 7376775
gc_NULL 7961508
cmpir 9433602
ugcdiu 10113879
cmpiu 10132364
cmpui 10132389
affectsign_safe 10728004
uabsdiviu_rem 11892741
addrs 12305001
smodss 12509166
rdivii 13103057
rdiviiz 13146279
mod8 13161461
mpabs_shallow 13428463
utor 13461955
affur 13462062
divii 14049784
subrs 16475742
dvdii 16562300
Fl_halve 18790744
modis 19638526
int_bit 20939052
smodis 21176060
evalvalser 21527935
hammingu 24048437
abscmpiu 32737748
abscmpui 32737901
mulri 38033756
mpexpo 38874696
absequaliu 39661305
absequalui 41410164
itos_or_0 43599183
Mod4 43779436
modsi 45225516
affui 45473825
Fl_div 46556900
stack_malloc 46625033
truedivii 47028138
umodi2n 48923122
sdivsi_rem 51429846
gc_bool 51983951
gc_ulong 52042130
affrr_fixlg 54652134
stack_malloc_align 55498832
absi_shallow 57786457
mod2 61113507
Fl_addmulmul_pre 64670115
minuu 69234265
remlll_pre 75922636
evalprecp 78665792
evalvalp 81623173
mpsqr 91022931
Fl_triple 94459988
Fl_sqr 95856284
addiu 96154878
addui 99798961
mod2BIL 103302823
fixlg 104195613
mpodd 115076845
icopyspec 117430727
togglesign_safe 125521400
real_1 129815006
subiu 131850257
subui 136823347
mpshift 153204342
dvmduBIL 165781327
shiftr 177981608
itou 178233911
addis 181556147
gc_double 184156992
vali 190365335
varncmp 217203072
gc_long 242317163
mpsub 251538965
utoineg 293928838
cgetineg 294790561
rtor 295250330
addsi 306741765
muliu 374396217
itos 462149338
shiftr_inplace 464229437
mulis 466267966
Fl_double 469144390
real_0_bit 479190137
addir 481429479
affsr 486094206
stor 486423775
mpadd 574348535
negi 636821161
itor 714790718
Fl_neg 719419526
umodsu 723917097
stoi 772630871
expu 775390531
lg2prec 799773368
mpmul 837530154
rcopy 903255197
affii 910639283
mpneg 916756154
subrr 1000209102
cgetg_copy 1480142674
cmpuu 1492943075
cgetr 1840244059
togglesign 1912455682
minss 2010012871
absi 2067637972
mpabs 2138422970
Fl_sqr_pre 2174731326
setabssign 2205153765
nbits2lg 2366243482
Fl_mul 2420127506
expi 2448730472
addrr 2877449671
remii 3005326261
adduu 3408955166
stackdummy 3641565182
Fl_mul_pre 4092618878
Fl_add 4402412632
leafcopy 4973135229
shift_right 5632426608
dvmdsBIL 7010696695
Fl_sub 7274169252
subii 7639151540
Fl_addmul_pre 7674600179
shift_left 7676980344
uutoi 8806109755
icopy 9047547738
maxss 9707431704
utoi 11892329138
addii 12399133053
evalexpo 13134760774
utoipos 14140448727
gc_const 15509646168
cgetipos 16310994894
cgetg 24551677770
cgeti 27072569932
new_chunk 93203349866
evallg 95167652468
set_avma 128954123906

Generated by: LCOV version 1.16