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 30849-48ff4d246c) Lines: 605 680 89.0 %
Date: 2026-05-01 09:26:53 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 33751
cmprs 40996
cgetr_block 44319
sdivsi 102149
stack_calloc 110705
gc_stoi 155901
dvdui 167195
subis 171738
Fl_ellj_pre 238060
mindd 264379
truedivis 268380
cmpri 303003
mod16 307007
Mod32 311108
uutoineg 362784
Mod16 389733
mpdiv 395508
cgetg_block 424338
gc_utoi 468712
dvdiu 576275
umodui 711392
cmpsr 796114
rdivss 839647
real2n 1068657
addri 1111452
equalis 1151313
equalsi 1151496
gc_utoipos 1153590
real_0 1159203
mpround 1216580
absrnz_equal2n 1301192
cmpss 1392943
Mod8 2073835
mpcmp 2161451
Mod2 2370231
udivuu_rem 2418379
gc_int 2739555
mulru 2765892
subir 3000315
equaliu 3021962
equalui 3021962
itou_or_0 3146572
maxdd 3211529
cmpis 3634557
negr 3683334
cmpsi 3866555
ceildivuu 3902729
Fl_center 4489147
absrnz_equal1 4556895
real_1_bit 4714188
mod4 5140878
subri 6085289
subsi 6184414
truedivsi 6202318
umuluu_or_0 6289601
affsi 6447161
maxuu 6611133
mulrs 7181596
fractor 7379562
umuluu_le 7617880
gc_NULL 7964384
cmpir 9445356
ugcdiu 10319994
affectsign_safe 10730887
uabsdiviu_rem 11892741
addrs 12364324
smodss 12480080
cmpiu 12969151
cmpui 12969206
rdivii 13104702
rdiviiz 13151255
mpabs_shallow 13428463
divii 14047003
utor 14268018
affur 14268139
mod8 15584741
subrs 16544514
dvdii 16906190
Fl_halve 18765472
modis 19638526
int_bit 20976554
smodis 21176102
hammingu 24048748
evalvalser 24359743
abscmpui 33352165
abscmpiu 33352328
mulri 38306125
mpexpo 38876054
absequaliu 39546256
absequalui 41296264
Mod4 43857333
itos_or_0 44911595
modsi 45242160
affui 45491533
Fl_div 46791077
stack_malloc 46928882
umodi2n 49000450
sdivsi_rem 51446774
gc_ulong 51681411
truedivii 54734173
stack_malloc_align 55535901
affrr_fixlg 56115343
gc_bool 56817942
absi_shallow 57403329
mod2 62589868
Fl_addmulmul_pre 64516351
minuu 69666208
remlll_pre 75610738
evalprecp 78668287
evalvalp 81624938
Fl_triple 87395389
mpsqr 90770195
addiu 98769099
Fl_sqr 99456655
addui 102842582
fixlg 105864870
mod2BIL 107449124
mpodd 116093301
icopyspec 118071983
subiu 133449987
real_1 133703193
subui 138427013
mpshift 153466058
togglesign_safe 157272417
dvmduBIL 163239929
itou 179086998
gc_double 184130659
shiftr 188192700
vali 191296705
addis 194765372
varncmp 199680451
gc_long 242688784
mpsub 249683580
utoineg 298271893
cgetineg 299132680
rtor 303778674
addsi 319952753
muliu 373509522
Fl_double 443213500
shiftr_inplace 466874054
mulis 467110396
itos 476320812
real_0_bit 481790909
addir 482828861
affsr 501384141
stor 501703931
mpadd 572238848
negi 641063858
itor 716819488
Fl_neg 729120520
umodsu 734140656
expu 797144263
stoi 799065402
lg2prec 815896157
mpmul 834936095
rcopy 916946377
mpneg 926937601
affii 964903515
subrr 1006380045
cmpuu 1490570274
cgetg_copy 1493203963
cgetr 1875897076
togglesign 1953903100
minss 2027974668
absi 2070321151
mpabs 2141256198
setabssign 2208651495
Fl_sqr_pre 2337670639
nbits2lg 2402786931
expi 2425936278
Fl_mul 2438170528
addrr 2930829168
remii 3062938363
adduu 3450227928
stackdummy 3689363290
Fl_mul_pre 4225175550
leafcopy 5065181896
shift_right 5732388921
Fl_add 6148067518
dvmdsBIL 7149938054
Fl_sub 7414592057
Fl_addmul_pre 7669634419
subii 7718087979
shift_left 7797935553
uutoi 8939665371
icopy 9157670483
maxss 9717604067
utoi 12056757018
addii 12533342344
evalexpo 13393369687
utoipos 14273473775
gc_const 15656247828
cgetipos 16457174960
cgetg 25533359019
cgeti 27485583419
new_chunk 95172975413
evallg 96900585670
set_avma 131407840894

Generated by: LCOV version 1.16