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 30590-f14e077362) Lines: 607 680 89.3 %
Date: 2026-01-02 09:20:44 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 43804
sdivsi 102151
stack_calloc 110359
gc_stoi 155884
dvdui 167195
subis 170920
Fl_ellj_pre 238040
mod16 241109
mindd 264321
truedivis 266938
cmpri 282310
Mod32 311108
uutoineg 361819
Mod16 389733
cgetg_block 407112
gc_utoi 468606
dvdiu 576267
mpdiv 665646
cmpsr 796095
rdivss 839647
real2n 1067009
addri 1105700
gc_utoipos 1153470
real_0 1156403
equalis 1181841
equalsi 1182023
mpround 1216583
absrnz_equal2n 1292750
umodui 1296275
cmpss 1379853
Mod8 2073960
mpcmp 2225712
udivuu_rem 2416412
Mod2 2479225
gc_int 2570026
mulru 2765892
subir 3005090
equaliu 3018191
equalui 3018191
itou_or_0 3041680
maxdd 3177096
cmpis 3634798
negr 3671233
cmpsi 3866794
ceildivuu 3881723
Fl_center 4485928
absrnz_equal1 4520490
real_1_bit 4704697
maxuu 4815094
mod4 4932610
umuluu_or_0 5515853
umuluu_le 5803291
subri 6087407
subsi 6093504
truedivsi 6202031
affsi 6373019
mulrs 7181596
fractor 7376766
gc_NULL 7961656
cmpir 9442175
ugcdiu 10105156
cmpiu 10117421
cmpui 10117458
affectsign_safe 10726670
uabsdiviu_rem 11892741
addrs 12305350
smodss 12518890
rdivii 13101134
rdiviiz 13146744
mod8 13162827
mpabs_shallow 13428463
utor 13461774
affur 13461875
divii 14038687
subrs 16475717
dvdii 16560804
Fl_halve 18778618
modis 19638526
int_bit 20966609
smodis 21176060
evalvalser 21527935
hammingu 24048321
abscmpiu 33065286
abscmpui 33065306
mulri 38033583
mpexpo 38871342
absequaliu 39660707
absequalui 41409652
itos_or_0 43599753
Mod4 43735565
modsi 45225550
affui 45473824
Fl_div 46492911
stack_malloc 46626778
truedivii 46992114
umodi2n 48988019
sdivsi_rem 51429876
gc_bool 51986474
gc_ulong 52071168
affrr_fixlg 54653109
stack_malloc_align 55489357
absi_shallow 58106927
mod2 61112173
Fl_addmulmul_pre 64568993
minuu 69040670
remlll_pre 75611127
evalprecp 78667281
evalvalp 81623931
mpsqr 91019417
Fl_triple 94365911
Fl_sqr 95869800
addiu 96803147
addui 100447137
mod2BIL 103151463
fixlg 104196653
mpodd 115074735
icopyspec 117080392
togglesign_safe 125582662
real_1 129783421
subiu 131484106
subui 136456992
mpshift 153127241
dvmduBIL 165646488
itou 177595667
shiftr 177971345
addis 181596669
gc_double 184112145
vali 190312960
varncmp 217206617
gc_long 242229177
mpsub 251557814
utoineg 293811275
cgetineg 294671966
rtor 295242468
addsi 306782050
muliu 371971482
itos 462080090
shiftr_inplace 464053400
mulis 464507540
Fl_double 468366551
addir 480488818
real_0_bit 480923443
affsr 486171137
stor 486450546
mpadd 575963575
negi 636773018
itor 713384822
Fl_neg 719177639
umodsu 723976477
stoi 772587843
expu 775246899
lg2prec 798418414
mpmul 839150594
rcopy 903088515
affii 910179028
mpneg 916674743
subrr 1000165303
cgetg_copy 1479963703
cmpuu 1492598325
cgetr 1838772173
togglesign 1910970915
minss 2008580472
absi 2067597447
mpabs 2138383939
Fl_sqr_pre 2171186576
setabssign 2205055067
nbits2lg 2366677665
Fl_mul 2419294882
expi 2446297060
addrr 2878189579
remii 3005014463
adduu 3412592968
stackdummy 3642235132
Fl_mul_pre 4081751837
Fl_add 4391812385
leafcopy 4972574622
shift_right 5627615542
dvmdsBIL 7004987818
Fl_sub 7269284371
Fl_addmul_pre 7652860174
subii 7656371468
shift_left 7674152676
uutoi 8812884524
icopy 9054679304
maxss 9707329820
utoi 11905725038
addii 12408608024
evalexpo 13131414333
utoipos 14147775542
gc_const 15490692569
cgetipos 16309446316
cgetg 24538216461
cgeti 27097883999
new_chunk 93196448844
evallg 95157677537
set_avma 128904470067

Generated by: LCOV version 1.16