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 30601-812dd05845) Lines: 605 680 89.0 %
Date: 2026-01-06 09:22:34 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4397909021
Fl_addmul_pre 7670255030
Fl_addmulmul_pre 64622239
Fl_center 4486096
Fl_div 46580209
Fl_double 468611401
Fl_ellj_pre 238035
Fl_halve 18788229
Fl_mul 2417877596
Fl_mul_pre 4089851321
Fl_neg 719389005
Fl_sqr 95865679
Fl_sqr_pre 2173130390
Fl_sub 7247184445
Fl_triple 94389341
Mod16 389733
Mod2 2370226
Mod32 311108
Mod4 43777116
Mod64 0
Mod8 2073992
abscmpiu 31756780
abscmpui 31756951
absequaliu 39661286
absequalui 41410208
absi 2068310695
absi_shallow 56807572
absr 140
absrnz_equal1 4519889
absrnz_equal2n 1292665
addii 12404543933
addir 481420585
addis 181589114
addiu 94192415
addri 1105767
addrr 2877222849
addrs 12304972
addsi 306774793
addss 25067
addui 97836402
adduu 3408365255
affectsign 0
affectsign_safe 10727184
affii 910269252
affrr_fixlg 54654090
affsi 6373138
affsr 486150608
affui 45473823
affur 13461912
ceildivuu 3904397
cgetg 24532775363
cgetg_block 407172
cgetg_copy 1480113188
cgeti 27088485748
cgetineg 294800749
cgetipos 16316809164
cgetr 1840273491
cgetr_block 43772
cmpir 9431807
cmpis 3634953
cmpiu 10131012
cmpri 282310
cmprs 40996
cmpsi 3866952
cmpsr 796094
cmpss 1379853
cmpui 10131032
cmpuu 1492645138
divii 14045207
divsi_rem 0
divss 0
divss_rem 0
dvdii 16542088
dvdiiz 0
dvdis 33709
dvdisz 0
dvdiu 576271
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7009546613
dvmdsi 0
dvmdss 0
dvmduBIL 165687938
equalis 1185555
equaliu 3018182
equalsi 1185737
equalui 3018186
evalexpo 13131887379
evallg 95161325741
evalprecp 78664189
evalvalp 81620851
evalvalser 21527935
expi 2448488300
expu 775399708
fixlg 104197738
fractor 7376766
gc_NULL 7961441
gc_bool 51963840
gc_const 15508092537
gc_double 184162544
gc_int 2631170
gc_long 242312798
gc_stoi 155884
gc_ulong 52061743
gc_utoi 468560
gc_utoipos 1153475
get_avma 0
hammingu 24048413
icopy 9051864399
icopyspec 117424860
int_bit 20912080
itor 714781005
itos 462144042
itos_or_0 43599745
itou 178233223
itou_or_0 3041711
leafcopy 4973565769
lg2prec 799746104
maxdd 3178550
maxss 9683396310
maxuu 4814951
mindd 264340
minss 2009624064
minuu 69318954
mod16 241110
mod2 61113319
mod2BIL 103300795
mod32 259
mod4 5084096
mod64 0
mod8 13161540
modis 19638526
modsi 45225470
modss 0
mpabs 2139096978
mpabs_shallow 13428463
mpadd 574276449
mpceil 0
mpcmp 2225917
mpcopy 665
mpdiv 665643
mpexpo 38876094
mpfloor 0
mpmul 837447646
mpneg 916738956
mpodd 115076464
mpround 1216577
mpshift 153182713
mpsqr 91023641
mpsub 251546388
mptrunc 49
mulis 466270912
muliu 374299774
mulri 38033647
mulrs 7181596
mulru 2765892
nbits2lg 2365606131
negi 636808683
negr 3671392
new_chunk 93202785197
rcopy 903219094
rdivii 13103737
rdiviiz 13147097
rdivis 0
rdivsi 0
rdivss 839647
real2n 1067030
real_0 1156418
real_0_bit 479059268
real_1 129814150
real_1_bit 4704894
real_m1 455
real_m2n 126
remii 3004013662
remis 0
remlll_pre 75778387
remsi 0
remss 0
rtor 295249487
sdivsi 102147
sdivsi_rem 51429814
sdivss_rem 0
set_avma 128937623728
setabssign 2205798553
shift_left 7676271590
shift_right 5631753970
shiftl 0
shiftlr 0
shiftr 177976193
shiftr_inplace 464298683
smodis 21176060
smodss 12468566
stack_calloc 110377
stack_calloc_align 3307
stack_malloc 46627116
stack_malloc_align 55499860
stackdummy 3634777270
stoi 772835367
stor 486464958
subii 7653399634
subir 3005081
subis 170917
subiu 131841724
subri 6127467
subrr 1000177888
subrs 16475589
subsi 6093505
subss 25067
subui 136814650
subuu 25067
thuemorseu 2851
togglesign 1912299674
togglesign_safe 125514533
truedivii 47027901
truedivis 266939
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 16693
udivuu_rem 2416412
ugcdiu 10113929
ugcdui 2737
umodi2n 48920329
umodsu 723965759
umodui 1296276
umuluu_le 5803291
umuluu_or_0 5513071
utoi 11899031785
utoineg 293939577
utoipos 14146437326
utor 13461809
uutoi 8810269593
uutoineg 362668
vali 190376602
varncmp 217203178
varnmax 203
varnmin 15547

Generated by: LCOV version 1.16