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 30822-5d69697d32) Lines: 605 680 89.0 %
Date: 2026-04-17 09:24: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
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 44062
sdivsi 102151
stack_calloc 110702
gc_stoi 155903
dvdui 167195
subis 171740
Fl_ellj_pre 238024
mindd 264381
truedivis 268367
cmpri 302870
mod16 307030
Mod32 311108
uutoineg 362149
Mod16 389733
mpdiv 395375
cgetg_block 423673
gc_utoi 468676
dvdiu 576277
umodui 711391
cmpsr 796100
rdivss 839647
real2n 1068649
addri 1106307
equalis 1151439
equalsi 1151623
gc_utoipos 1153544
real_0 1157800
mpround 1216601
absrnz_equal2n 1301143
cmpss 1392943
Mod8 2074000
mpcmp 2156251
Mod2 2370198
udivuu_rem 2418379
gc_int 2739289
mulru 2765892
subir 3000053
equaliu 3021804
equalui 3021816
itou_or_0 3147033
maxdd 3211399
cmpis 3634478
negr 3683083
cmpsi 3866484
ceildivuu 3905780
Fl_center 4485947
absrnz_equal1 4557057
real_1_bit 4714271
mod4 5140753
subri 6093987
subsi 6184573
truedivsi 6202318
umuluu_or_0 6280288
affsi 6446342
maxuu 6610621
mulrs 7181596
fractor 7380433
umuluu_le 7617880
gc_NULL 7961651
cmpir 9448373
ugcdiu 10320479
affectsign_safe 10728652
uabsdiviu_rem 11892741
addrs 12364343
smodss 12498293
cmpiu 12983349
cmpui 12983509
rdivii 13106315
rdiviiz 13150495
mpabs_shallow 13428463
divii 14053404
utor 14266118
affur 14266215
mod8 15584744
subrs 16544763
dvdii 16907169
Fl_halve 18773794
modis 19638526
int_bit 20973921
smodis 21176088
hammingu 24048771
evalvalser 24359582
abscmpui 31702152
abscmpiu 31702274
mulri 38307538
mpexpo 38879854
absequaliu 39546457
absequalui 41296476
Mod4 43842482
itos_or_0 44911590
modsi 45242217
affui 45491533
Fl_div 46727290
stack_malloc 46923652
umodi2n 48986151
sdivsi_rem 51446831
gc_ulong 51708079
truedivii 54734924
stack_malloc_align 55539463
absi_shallow 55744994
affrr_fixlg 56117025
gc_bool 56802993
mod2 62590576
Fl_addmulmul_pre 64507117
minuu 69763951
remlll_pre 75846847
evalprecp 78668387
evalvalp 81625008
Fl_triple 87273726
mpsqr 90785935
addiu 95458079
Fl_sqr 99457905
addui 99532926
fixlg 105856772
mod2BIL 107444934
mpodd 116095103
icopyspec 118026603
subiu 133462682
real_1 133709636
subui 138439867
mpshift 153525219
togglesign_safe 157280374
dvmduBIL 165741059
itou 179080903
gc_double 184190107
shiftr 188188222
vali 191177304
addis 194774948
varncmp 199456821
gc_long 242673557
mpsub 249752721
utoineg 298132504
cgetineg 298992434
rtor 303776831
addsi 319961081
muliu 373413625
Fl_double 441743523
shiftr_inplace 467049517
mulis 467111185
itos 476314488
real_0_bit 482311223
addir 482795977
affsr 501313604
stor 501677570
mpadd 572745752
negi 641051928
itor 717067015
Fl_neg 729030116
umodsu 734184808
expu 797052552
stoi 799336604
lg2prec 816074498
mpmul 835543195
rcopy 916834076
mpneg 926946589
affii 965298291
subrr 1006550097
cmpuu 1490504637
cgetg_copy 1492124915
cgetr 1876072403
togglesign 1953993196
minss 2028646547
absi 2069051800
mpabs 2139985956
setabssign 2207294590
Fl_sqr_pre 2336229954
nbits2lg 2403527442
expi 2425602125
Fl_mul 2433515951
addrr 2932179890
remii 3063955773
adduu 3447605721
stackdummy 3677903681
Fl_mul_pre 4214173918
leafcopy 5064365549
shift_right 5732209839
Fl_add 6111048010
dvmdsBIL 7151616172
Fl_sub 7372874370
Fl_addmul_pre 7652936306
subii 7721688116
shift_left 7798287306
uutoi 8932948395
icopy 9157689222
maxss 9682916593
utoi 12045438278
addii 12537375440
evalexpo 13399457546
utoipos 14261807396
gc_const 15656217380
cgetipos 16445471145
cgetg 25507233127
cgeti 27479456137
new_chunk 95111867822
evallg 96839171571
set_avma 131333272179

Generated by: LCOV version 1.16