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 30625-1bbc371a2f) Lines: 607 680 89.3 %
Date: 2026-01-23 09:24:12 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 43778
sdivsi 102147
stack_calloc 110359
gc_stoi 155881
dvdui 167195
subis 170918
Fl_ellj_pre 238051
mod16 241102
mindd 264336
truedivis 266945
cmpri 282310
Mod32 311108
uutoineg 363682
Mod16 389733
cgetg_block 424696
gc_utoi 468591
dvdiu 576269
mpdiv 665633
cmpsr 796103
rdivss 839647
real2n 1067011
addri 1105762
gc_utoipos 1153475
real_0 1156427
equalis 1185585
equalsi 1185767
mpround 1216581
absrnz_equal2n 1292660
umodui 1296276
cmpss 1379853
Mod8 2074141
mpcmp 2225882
Mod2 2370310
udivuu_rem 2416412
gc_int 2631191
mulru 2765892
subir 3005118
equaliu 3018215
equalui 3018216
itou_or_0 3041715
maxdd 3178542
cmpis 3634862
negr 3671971
cmpsi 3866859
ceildivuu 3904896
Fl_center 4486121
absrnz_equal1 4519919
real_1_bit 4704764
maxuu 4815358
mod4 5084214
umuluu_or_0 5502422
umuluu_le 5803291
subsi 6093392
subri 6132387
truedivsi 6202031
affsi 6373195
mulrs 7181596
fractor 7376776
gc_NULL 7962410
cmpir 9435083
ugcdiu 10112930
cmpiu 10133575
cmpui 10133576
affectsign_safe 10727773
uabsdiviu_rem 11892741
addrs 12305056
smodss 12667062
rdivii 13103843
rdiviiz 13145402
mod8 13162189
mpabs_shallow 13428463
utor 13461610
affur 13461725
divii 14060936
subrs 16475680
dvdii 16551211
Fl_halve 18838297
modis 19638526
int_bit 21009622
smodis 21176060
evalvalser 21527935
hammingu 24048424
abscmpui 33682547
abscmpiu 33682642
mulri 38033983
mpexpo 38877816
absequaliu 39661507
absequalui 41410418
itos_or_0 43599454
Mod4 43792362
modsi 45225496
affui 45473822
Fl_div 46542059
stack_malloc 46627224
truedivii 47032511
umodi2n 48936603
sdivsi_rem 51429850
gc_bool 51975510
gc_ulong 52102231
affrr_fixlg 54655118
stack_malloc_align 55501368
absi_shallow 58728506
mod2 61113002
Fl_addmulmul_pre 64740629
minuu 69271642
remlll_pre 76017993
evalprecp 78668995
evalvalp 81625468
mpsqr 91033647
Fl_triple 95219615
Fl_sqr 95998580
addiu 98043905
addui 101687970
mod2BIL 103305673
fixlg 104198543
mpodd 115075766
icopyspec 117425197
togglesign_safe 125533868
real_1 129821363
subiu 131843837
subui 136816873
mpshift 153277627
dvmduBIL 165916012
shiftr 177989099
itou 178233116
addis 181574088
gc_double 184194796
vali 190378936
varncmp 217202942
gc_long 242321516
mpsub 251576789
utoineg 293948060
cgetineg 294809503
rtor 295256994
addsi 306760140
muliu 374756561
itos 462162425
shiftr_inplace 464454552
mulis 466288678
Fl_double 471917269
real_0_bit 479507390
addir 481439885
affsr 486358917
stor 486609168
mpadd 574639684
negi 636787814
itor 715162563
Fl_neg 719565800
umodsu 724007883
stoi 772699564
expu 775560140
lg2prec 800211884
mpmul 837907426
rcopy 903324757
affii 910616424
mpneg 916741786
subrr 1000303670
cgetg_copy 1480234305
cmpuu 1493003692
cgetr 1840944054
togglesign 1912534783
minss 2011014322
absi 2068346718
mpabs 2139137020
Fl_sqr_pre 2185150218
setabssign 2205845738
nbits2lg 2367091131
Fl_mul 2423462885
expi 2448752066
addrr 2878674316
remii 3009369895
adduu 3412012132
stackdummy 3650448218
Fl_mul_pre 4106141811
Fl_add 4414883338
leafcopy 4974185984
shift_right 5636856396
dvmdsBIL 7015448362
Fl_sub 7302769533
subii 7643473595
Fl_addmul_pre 7675683983
shift_left 7679786541
uutoi 8814778075
icopy 9053881142
maxss 9732793066
utoi 11903202666
addii 12408345491
evalexpo 13145345672
utoipos 14151882128
gc_const 15511897472
cgetipos 16321517010
cgetg 24582052062
cgeti 27102067852
new_chunk 93278199588
evallg 95253416121
set_avma 129052570257

Generated by: LCOV version 1.16