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 30724-b49b12e983) Lines: 605 680 89.0 %
Date: 2026-03-02 09:24:58 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 10577
uabsdivui_rem 16693
addss 24997
subss 24997
subuu 24997
dvdis 33723
cmprs 40996
cgetr_block 43777
sdivsi 102081
stack_calloc 110480
gc_stoi 155883
dvdui 167195
subis 171670
Fl_ellj_pre 238048
mindd 264338
truedivis 266955
cmpri 282310
mod16 307019
Mod32 311108
uutoineg 363480
Mod16 389733
cgetg_block 424995
gc_utoi 468574
dvdiu 576273
mpdiv 665623
cmpsr 796100
rdivss 839647
real2n 1067006
addri 1106279
equalis 1150961
equalsi 1151143
gc_utoipos 1153475
real_0 1156526
mpround 1216579
umodui 1291849
absrnz_equal2n 1292608
cmpss 1392943
Mod8 2074221
mpcmp 2226350
Mod2 2370216
udivuu_rem 2418330
gc_int 2631206
mulru 2765892
subir 3005064
equaliu 3018144
equalui 3018144
itou_or_0 3146716
maxdd 3178546
cmpis 3633492
negr 3671679
cmpsi 3865492
ceildivuu 3902537
Fl_center 4485996
absrnz_equal1 4519840
real_1_bit 4705088
maxuu 4815236
mod4 5139161
umuluu_le 5803291
subri 6125072
umuluu_or_0 6150732
subsi 6182780
truedivsi 6202031
affsi 6437506
mulrs 7181596
fractor 7376922
gc_NULL 7961703
cmpir 9430573
ugcdiu 10148225
affectsign_safe 10728819
uabsdiviu_rem 11892741
cmpui 12180685
cmpiu 12181059
addrs 12304890
smodss 12627985
rdivii 13106512
rdiviiz 13148165
mpabs_shallow 13428463
utor 13461845
affur 13461960
divii 14055490
mod8 15578592
subrs 16475714
dvdii 16902803
Fl_halve 18818191
modis 19638526
int_bit 20958139
smodis 21176074
evalvalser 21529069
hammingu 24048336
abscmpiu 32870765
abscmpui 32870804
mulri 38033890
mpexpo 38872339
absequaliu 39352843
absequalui 41101738
itos_or_0 43602422
Mod4 43851307
modsi 45225525
affui 45473825
Fl_div 46476502
stack_malloc 46822975
umodi2n 48998890
sdivsi_rem 51429853
gc_ulong 52047668
affrr_fixlg 54656255
truedivii 54723009
stack_malloc_align 55496701
gc_bool 56141876
absi_shallow 56868025
mod2 61231490
Fl_addmulmul_pre 64724619
minuu 69582817
remlll_pre 75963273
evalprecp 78670796
evalvalp 81627928
mpsqr 91018413
Fl_triple 91094661
addiu 97689568
Fl_sqr 99447791
addui 101337090
fixlg 104201839
mod2BIL 106065953
mpodd 115176706
icopyspec 117466062
real_1 129866071
subiu 131922618
subui 136895704
mpshift 153261528
togglesign_safe 157202648
dvmduBIL 159158629
shiftr 178066962
itou 178234406
gc_double 184158729
addis 184500102
vali 190423130
varncmp 207209625
gc_long 242519932
mpsub 251523536
rtor 295262821
utoineg 297046296
cgetineg 297906668
addsi 309684019
muliu 375542468
Fl_double 452967914
shiftr_inplace 464557253
mulis 467037170
itos 472279673
real_0_bit 479172701
addir 481440229
affsr 486270447
stor 486568656
mpadd 574294701
negi 640146005
itor 715207909
Fl_neg 723871481
umodsu 734148410
expu 775662666
stoi 796716038
lg2prec 800316599
mpmul 837503606
rcopy 903470840
mpneg 920099430
affii 957585734
subrr 1000265121
cgetg_copy 1452194571
cmpuu 1490905994
cgetr 1840859098
togglesign 1943016149
minss 2008504452
absi 2065971325
mpabs 2136749666
Fl_sqr_pre 2155277979
setabssign 2203457073
nbits2lg 2367444078
expi 2420681411
Fl_mul 2429357886
addrr 2878179526
remii 3017138108
adduu 3443661485
stackdummy 3629951849
Fl_mul_pre 4081822519
Fl_add 4398171615
leafcopy 4977271339
shift_right 5633767743
dvmdsBIL 7032178315
Fl_sub 7225055380
Fl_addmul_pre 7658924296
subii 7682175052
shift_left 7694452769
uutoi 8930996174
icopy 9057327020
maxss 9712205448
utoi 12040640818
addii 12542880023
evalexpo 13162316010
utoipos 14251938214
gc_const 15597608271
cgetipos 16414521385
cgetg 24578818877
cgeti 27271046276
new_chunk 93563788692
evallg 95394888066
set_avma 129538757228

Generated by: LCOV version 1.16