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 30831-19b50a36d0) Lines: 605 680 89.0 %
Date: 2026-04-22 09:25:48 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
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 3313
stack_calloc_align 3325
varnmin 10374
uabsdivui_rem 16693
absr 20510
addss 25067
subss 25067
subuu 25067
dvdis 33737
cmprs 40996
cgetr_block 44224
sdivsi 102149
stack_calloc 110670
gc_stoi 155903
dvdui 167195
subis 171739
Fl_ellj_pre 238047
mindd 264383
truedivis 268380
cmpri 302869
mod16 307031
Mod32 311108
uutoineg 362321
Mod16 389733
mpdiv 395373
cgetg_block 423668
gc_utoi 468715
dvdiu 576278
umodui 711392
cmpsr 796105
rdivss 839647
real2n 1068657
addri 1106253
equalis 1151299
equalsi 1151481
gc_utoipos 1153583
real_0 1157768
mpround 1216580
absrnz_equal2n 1301176
cmpss 1392943
Mod8 2073803
mpcmp 2156212
Mod2 2370121
udivuu_rem 2418379
gc_int 2739306
mulru 2765892
subir 3000059
equalui 3021817
equaliu 3021818
itou_or_0 3147025
maxdd 3211461
cmpis 3634399
negr 3683108
cmpsi 3866405
ceildivuu 3902769
Fl_center 4486113
absrnz_equal1 4556943
real_1_bit 4714144
mod4 5140602
subri 6066630
subsi 6184670
truedivsi 6202318
umuluu_or_0 6295322
affsi 6446297
maxuu 6610762
mulrs 7181596
fractor 7380427
umuluu_le 7617880
gc_NULL 7962501
cmpir 9460593
ugcdiu 10320673
affectsign_safe 10730185
uabsdiviu_rem 11892741
addrs 12364216
smodss 12493576
cmpiu 12981648
cmpui 12981808
rdivii 13105453
rdiviiz 13150139
mpabs_shallow 13428463
divii 14048410
utor 14266488
affur 14266604
mod8 15584345
subrs 16544543
dvdii 16900488
Fl_halve 18770987
modis 19638526
int_bit 20950787
smodis 21176088
hammingu 24048774
evalvalser 24359582
abscmpiu 32320758
abscmpui 32321494
mulri 38307274
mpexpo 38875500
absequaliu 39546009
absequalui 41296024
Mod4 43845529
itos_or_0 44911385
modsi 45242146
affui 45491533
Fl_div 46687773
stack_malloc 46923280
umodi2n 48988532
sdivsi_rem 51446761
gc_ulong 51679787
truedivii 54706140
stack_malloc_align 55534705
affrr_fixlg 56115619
absi_shallow 56363071
gc_bool 56795553
mod2 62589748
Fl_addmulmul_pre 64564173
minuu 69684537
remlll_pre 75710142
evalprecp 78675746
evalvalp 81632153
Fl_triple 87223068
mpsqr 90785127
addiu 96700167
Fl_sqr 99450226
addui 100775168
fixlg 105855431
mod2BIL 107444355
mpodd 116094781
icopyspec 118027061
subiu 133459801
real_1 133688827
subui 138436864
mpshift 153512220
togglesign_safe 157251983
dvmduBIL 165626033
itou 179081315
gc_double 184054188
shiftr 188186503
vali 191178225
addis 194783354
varncmp 199456687
gc_long 242673519
mpsub 249753876
utoineg 298130491
cgetineg 298991637
rtor 303776586
addsi 319968219
muliu 373313523
Fl_double 442422628
shiftr_inplace 466887626
mulis 467095426
itos 476266394
addir 482786931
real_0_bit 484131368
affsr 501378192
stor 501710314
mpadd 574364176
negi 640999632
itor 716760929
Fl_neg 728991761
umodsu 734147628
expu 797073588
stoi 799138868
lg2prec 815953082
mpmul 837157716
rcopy 916841176
mpneg 926878731
affii 964843529
subrr 1006505579
cmpuu 1490477627
cgetg_copy 1492132285
cgetr 1875769650
togglesign 1953736625
minss 2028100429
absi 2068855008
mpabs 2139814475
setabssign 2207115353
Fl_sqr_pre 2337150109
nbits2lg 2404553474
expi 2425328285
Fl_mul 2434682967
addrr 2933272834
remii 3062210626
adduu 3448054171
stackdummy 3681950113
Fl_mul_pre 4214847911
leafcopy 5064001325
shift_right 5731325029
Fl_add 6136926002
dvmdsBIL 7149810038
Fl_sub 7388873004
Fl_addmul_pre 7653750525
subii 7719965119
shift_left 7797057591
uutoi 8936016137
icopy 9155786805
maxss 9697691232
utoi 12047928607
addii 12533270745
evalexpo 13400264860
utoipos 14264061837
gc_const 15654950066
cgetipos 16449720299
cgetg 25517950351
cgeti 27486593866
new_chunk 95125272169
evallg 96868119928
set_avma 131349378458

Generated by: LCOV version 1.16