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 30666-e2f9826198) Lines: 607 680 89.3 %
Date: 2026-02-04 09:22:32 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 43784
sdivsi 102150
stack_calloc 110363
gc_stoi 155887
dvdui 167195
subis 170919
Fl_ellj_pre 238049
mod16 241104
mindd 264341
truedivis 266963
cmpri 282310
Mod32 311108
uutoineg 362576
Mod16 389733
cgetg_block 424974
gc_utoi 468637
dvdiu 576271
mpdiv 665623
cmpsr 796104
rdivss 839647
real2n 1067058
addri 1106254
gc_utoipos 1153460
real_0 1156508
equalis 1185671
equalsi 1185853
mpround 1216577
absrnz_equal2n 1292642
umodui 1296276
cmpss 1392943
Mod8 2074047
mpcmp 2226400
Mod2 2370194
udivuu_rem 2418330
gc_int 2631157
mulru 2765892
subir 3005101
equaliu 3018231
equalui 3018232
itou_or_0 3041714
maxdd 3178623
cmpis 3634839
negr 3671372
cmpsi 3866839
ceildivuu 3902559
Fl_center 4486192
absrnz_equal1 4520019
real_1_bit 4705146
maxuu 4814747
mod4 5084677
umuluu_or_0 5525767
umuluu_le 5803291
subsi 6094063
subri 6124397
truedivsi 6202031
affsi 6373371
mulrs 7181596
fractor 7376922
gc_NULL 7961915
cmpir 9431725
ugcdiu 10113759
cmpiu 10130965
cmpui 10131012
affectsign_safe 10729067
uabsdiviu_rem 11892741
addrs 12305162
smodss 12521497
rdivii 13103524
rdiviiz 13146205
mod8 13160481
mpabs_shallow 13428463
utor 13462000
affur 13462108
divii 14057661
subrs 16476000
dvdii 16560845
Fl_halve 18811005
modis 19638526
int_bit 20974419
smodis 21176060
evalvalser 21528873
hammingu 24048443
abscmpiu 32614323
abscmpui 32614489
mulri 38033825
mpexpo 38875606
absequaliu 39661014
absequalui 41409896
itos_or_0 43599941
Mod4 43786170
modsi 45225528
affui 45473825
Fl_div 46571413
stack_malloc 46625149
truedivii 47016833
umodi2n 48932388
sdivsi_rem 51429857
gc_bool 51983358
gc_ulong 52056171
affrr_fixlg 54653094
stack_malloc_align 55499932
absi_shallow 57663579
mod2 61112747
Fl_addmulmul_pre 64666883
minuu 69075842
remlll_pre 75913014
evalprecp 78668450
evalvalp 81625099
mpsqr 91025899
Fl_triple 94900994
Fl_sqr 95836737
addiu 95908133
addui 99552249
mod2BIL 103302711
fixlg 104196775
mpodd 115076077
icopyspec 117434269
togglesign_safe 125502108
real_1 129812941
subiu 131850058
subui 136823251
mpshift 153254937
dvmduBIL 165937472
shiftr 177970885
itou 178244925
addis 181580333
gc_double 184170416
vali 190382067
varncmp 217203197
gc_long 242460076
mpsub 251546181
utoineg 293989222
cgetineg 294851679
rtor 295249538
addsi 306765818
muliu 374641104
itos 462139747
shiftr_inplace 464302393
mulis 466282570
Fl_double 470376354
real_0_bit 479180621
addir 481437409
affsr 486082804
stor 486440056
mpadd 574313558
negi 636864234
itor 715168379
Fl_neg 723889383
umodsu 734135047
stoi 772347552
expu 775391835
lg2prec 800198709
mpmul 837567973
rcopy 903262128
affii 910483342
mpneg 916817602
subrr 1000239759
cgetg_copy 1480487123
cmpuu 1492953932
cgetr 1840542972
togglesign 1912290481
minss 2010978880
absi 2067748170
mpabs 2138529673
Fl_sqr_pre 2179858134
setabssign 2205256882
nbits2lg 2366299126
Fl_mul 2420643363
expi 2448735578
addrr 2877700202
remii 3007449000
adduu 3409991932
stackdummy 3642040006
Fl_mul_pre 4100599323
Fl_add 4407421231
leafcopy 4976080474
shift_right 5634146477
dvmdsBIL 7012569030
Fl_sub 7277781381
subii 7641652745
Fl_addmul_pre 7677564276
shift_left 7677673870
uutoi 8807014676
icopy 9052324929
maxss 9709246652
utoi 11893707723
addii 12407218118
evalexpo 13140025602
utoipos 14142064591
gc_const 15513218088
cgetipos 16305280425
cgetg 24557626726
cgeti 27083715504
new_chunk 93220020747
evallg 95208126538
set_avma 128996186572

Generated by: LCOV version 1.16