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 30631-5f55634266) Lines: 605 680 89.0 %
Date: 2026-01-24 09:23: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 43737
sdivsi 102148
stack_calloc 110349
gc_stoi 155885
dvdui 167195
subis 170918
Fl_ellj_pre 238042
mod16 241108
mindd 264340
truedivis 266965
cmpri 282310
Mod32 311108
uutoineg 363009
Mod16 389733
cgetg_block 424859
gc_utoi 468603
dvdiu 576273
mpdiv 665646
cmpsr 796101
rdivss 839647
real2n 1066999
addri 1105791
gc_utoipos 1153473
real_0 1156440
equalis 1185656
equalsi 1185837
mpround 1216577
absrnz_equal2n 1292653
umodui 1296276
cmpss 1379853
Mod8 2074039
mpcmp 2225893
Mod2 2370304
udivuu_rem 2416412
gc_int 2631178
mulru 2765892
subir 3005082
equaliu 3018221
equalui 3018222
itou_or_0 3041725
maxdd 3178570
cmpis 3634866
negr 3671147
cmpsi 3866866
ceildivuu 3901577
Fl_center 4485908
absrnz_equal1 4519964
real_1_bit 4704785
maxuu 4815109
mod4 5084074
umuluu_or_0 5528121
umuluu_le 5803291
subsi 6093370
subri 6144691
truedivsi 6202031
affsi 6373095
mulrs 7181596
fractor 7376772
gc_NULL 7961415
cmpir 9438186
ugcdiu 10114211
cmpui 10133423
cmpiu 10133530
affectsign_safe 10727074
uabsdiviu_rem 11892741
addrs 12305120
smodss 12506238
rdivii 13104286
rdiviiz 13147352
mod8 13164169
mpabs_shallow 13428463
utor 13461741
affur 13461855
divii 14058687
subrs 16475690
dvdii 16559348
Fl_halve 18795020
modis 19638526
int_bit 20933686
smodis 21176060
evalvalser 21527935
hammingu 24049593
abscmpiu 32388058
abscmpui 32388168
mulri 38033674
mpexpo 38880002
absequaliu 39661081
absequalui 41410003
itos_or_0 43599591
Mod4 43780812
modsi 45225504
affui 45473822
Fl_div 46519523
stack_malloc 46627429
truedivii 47039835
umodi2n 48924683
sdivsi_rem 51429832
gc_bool 51980429
gc_ulong 52050589
affrr_fixlg 54653184
stack_malloc_align 55504688
absi_shallow 57437134
mod2 61113201
Fl_addmulmul_pre 64630430
minuu 69002654
remlll_pre 75799001
evalprecp 78666024
evalvalp 81622708
mpsqr 91043284
Fl_triple 94493335
addiu 95454805
Fl_sqr 95902678
addui 99098859
mod2BIL 103305535
fixlg 104196427
mpodd 115076427
icopyspec 117425139
togglesign_safe 125532431
real_1 129825887
subiu 131845408
subui 136818468
mpshift 153221213
dvmduBIL 165750860
shiftr 177975960
itou 178234541
addis 181550488
gc_double 184200157
vali 190377817
varncmp 217202785
gc_long 242317577
mpsub 251644963
utoineg 293951994
cgetineg 294813679
rtor 295244900
addsi 306736301
muliu 374368879
itos 462167361
shiftr_inplace 464234514
mulis 466296650
Fl_double 469278981
real_0_bit 479689478
addir 481424457
affsr 486083697
stor 486420375
mpadd 574900642
negi 636829741
itor 714982517
Fl_neg 719278186
umodsu 723956126
stoi 772190728
expu 775369084
lg2prec 799874178
mpmul 838185516
rcopy 903211228
affii 910304008
mpneg 916762400
subrr 1000260003
cgetg_copy 1480223839
cmpuu 1492982358
cgetr 1840425540
togglesign 1912456892
minss 2009923349
absi 2068301795
mpabs 2139095737
Fl_sqr_pre 2175602417
setabssign 2205808959
nbits2lg 2367019241
Fl_mul 2420441744
expi 2448537948
addrr 2878044011
remii 3004808103
adduu 3407797042
stackdummy 3641318416
Fl_mul_pre 4095382076
Fl_add 4397915055
leafcopy 4973796524
shift_right 5632552700
dvmdsBIL 7010993917
Fl_sub 7269792809
subii 7639747548
Fl_addmul_pre 7668623321
shift_left 7676977665
uutoi 8801061624
icopy 9049857917
maxss 9705524927
utoi 11886042427
addii 12398353919
evalexpo 13135384610
utoipos 14134561187
gc_const 15508593186
cgetipos 16304134403
cgetg 24549990755
cgeti 27069030101
new_chunk 93199003324
evallg 95160632480
set_avma 128943990887

Generated by: LCOV version 1.16