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 30536-6f6fcf9613) Lines: 605 680 89.0 %
Date: 2025-11-02 09:21:49 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 33912
cmprs 40996
cgetr_block 43624
sdivsi 102149
stack_calloc 110574
gc_stoi 155885
dvdui 167195
subis 170993
mod16 241351
Fl_ellj_pre 242608
truedivis 266818
mindd 270161
cmpri 282310
Mod32 311108
uutoineg 355460
Mod16 389733
cgetg_block 393707
gc_utoi 468657
dvdiu 576570
mpdiv 667708
cmpsr 795894
rdivss 839647
real2n 1067408
addri 1109354
gc_utoipos 1153871
real_0 1156124
equalis 1181619
equalsi 1181801
mpround 1216547
absrnz_equal2n 1291339
umodui 1296416
cmpss 1427033
Mod8 2075129
mpcmp 2227507
udivuu_rem 2416391
Mod2 2479841
gc_int 2574297
mulru 2765822
subir 3006709
equaliu 3018656
equalui 3018656
itou_or_0 3041665
maxdd 3176327
cmpis 3633491
negr 3668535
ceildivuu 3846731
cmpsi 3865470
Fl_center 4485593
absrnz_equal1 4518153
mod4 4700743
real_1_bit 4706036
maxuu 4804829
umuluu_or_0 5546567
umuluu_le 5803235
subsi 6117452
subri 6124621
truedivsi 6202031
affsi 6383390
mulrs 7181596
fractor 7376013
gc_NULL 7968395
cmpir 9424226
ugcdiu 10082825
cmpiu 10119427
cmpui 10119436
affectsign_safe 10736998
uabsdiviu_rem 11892741
addrs 12303354
smodss 12534726
rdivii 13095104
rdiviiz 13140072
mod8 13271565
mpabs_shallow 13428463
utor 13462304
affur 13462388
divii 14055725
subrs 16475188
dvdii 16548009
Fl_halve 18034577
modis 19638526
smodis 21176263
evalvalser 21443044
int_bit 22280551
hammingu 24045845
abscmpiu 32730196
abscmpui 32730260
mulri 38033001
mpexpo 38853333
absequaliu 39662899
absequalui 41411804
itos_or_0 43594234
Mod4 43782331
modsi 45225532
affui 45473825
Fl_div 46494549
stack_malloc 46641392
truedivii 46806106
umodi2n 49038132
sdivsi_rem 51429859
gc_bool 51988174
gc_ulong 52166225
affrr_fixlg 54636000
stack_malloc_align 55488104
absi_shallow 57786331
Fl_addmulmul_pre 60098454
mod2 61153633
minuu 69102046
remlll_pre 75478612
evalprecp 78668148
evalvalp 81625385
mpsqr 90967096
Fl_sqr 94862238
Fl_triple 95652815
addiu 95901306
addui 99551027
mod2BIL 103361317
fixlg 104133706
mpodd 115083357
icopyspec 117026795
togglesign_safe 125523456
real_1 129765896
subiu 131675266
subui 136368723
mpshift 153187726
dvmduBIL 165741992
itou 177092730
shiftr 177924734
addis 181585810
gc_double 184319030
vali 190340946
varncmp 217203946
gc_long 241812543
mpsub 251499178
utoineg 294154974
cgetineg 295012326
rtor 295206722
addsi 306769200
muliu 373444752
itos 461712991
mulis 463145146
shiftr_inplace 463639905
Fl_double 474573940
real_0_bit 478710913
addir 479839571
affsr 485927848
stor 486251149
mpadd 573986172
negi 636715988
itor 713076962
Fl_neg 716536666
umodsu 724197822
stoi 772646003
expu 775151515
lg2prec 797860268
mpmul 837091762
rcopy 902601192
affii 908964449
mpneg 916636605
subrr 1000067073
cgetg_copy 1479705585
cmpuu 1492980925
cgetr 1838050850
togglesign 1911036270
minss 2008390625
absi 2060303965
mpabs 2131059083
Fl_sqr_pre 2163304586
setabssign 2197727148
nbits2lg 2361638116
Fl_mul 2413920391
expi 2452974547
addrr 2875532776
remii 3012358884
adduu 3411061318
stackdummy 3641641461
Fl_mul_pre 4082730106
Fl_add 4353089224
leafcopy 4964182667
shift_right 5623943089
dvmdsBIL 7012352879
Fl_sub 7293142641
Fl_addmul_pre 7640091208
subii 7664436558
shift_left 7681057118
uutoi 8805488330
icopy 9056606235
maxss 9723674057
utoi 11893336821
addii 12407243897
evalexpo 13125395488
utoipos 14137414956
gc_const 15514398064
cgetipos 16298123349
cgetg 24530108365
cgeti 27125855965
new_chunk 93235890098
evallg 95218321289
set_avma 128983823578

Generated by: LCOV version 1.16