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 30672-116f3d5b0e) Lines: 605 680 89.0 %
Date: 2026-02-07 09:23:42 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 33709
cmprs 40996
cgetr_block 43829
sdivsi 102150
stack_calloc 110381
gc_stoi 155887
dvdui 167195
subis 170919
Fl_ellj_pre 238050
mod16 241110
mindd 264337
truedivis 266950
cmpri 282310
Mod32 311108
uutoineg 363380
Mod16 389733
cgetg_block 424941
gc_utoi 468666
dvdiu 576268
mpdiv 665645
cmpsr 796095
rdivss 839647
real2n 1067067
addri 1106192
gc_utoipos 1153495
real_0 1156556
equalis 1185560
equalsi 1185743
mpround 1216576
absrnz_equal2n 1292683
umodui 1296276
cmpss 1392943
Mod8 2074043
mpcmp 2226368
Mod2 2370181
udivuu_rem 2418330
gc_int 2631192
mulru 2765892
subir 3005122
equaliu 3018228
equalui 3018228
itou_or_0 3041710
maxdd 3178439
cmpis 3634856
negr 3671430
cmpsi 3866855
ceildivuu 3903162
Fl_center 4486121
absrnz_equal1 4519906
real_1_bit 4705056
maxuu 4815308
mod4 5084645
umuluu_or_0 5529912
umuluu_le 5803291
subsi 6094064
subri 6098182
truedivsi 6202031
affsi 6373275
mulrs 7181596
fractor 7376930
gc_NULL 7962762
cmpir 9449605
ugcdiu 10113643
cmpiu 10131954
cmpui 10131975
affectsign_safe 10727844
uabsdiviu_rem 11892741
addrs 12304842
smodss 12516706
rdivii 13103469
rdiviiz 13146462
mod8 13162744
mpabs_shallow 13428463
utor 13462067
affur 13462184
divii 14045493
subrs 16475801
dvdii 16567055
Fl_halve 18806686
modis 19638526
int_bit 20958481
smodis 21176060
evalvalser 21528999
hammingu 24048348
abscmpiu 31671994
abscmpui 31672205
mulri 38033778
mpexpo 38874004
absequaliu 39661336
absequalui 41410269
itos_or_0 43599673
Mod4 43793626
modsi 45225528
affui 45473825
Fl_div 46561271
stack_malloc 46625123
truedivii 47004322
umodi2n 48936463
sdivsi_rem 51429860
gc_bool 51988563
gc_ulong 52058211
affrr_fixlg 54652234
stack_malloc_align 55498030
absi_shallow 56719938
mod2 61112639
Fl_addmulmul_pre 64703680
minuu 69252610
remlll_pre 76136861
evalprecp 78668999
evalvalp 81626389
mpsqr 91034980
addiu 94025943
Fl_triple 94893914
Fl_sqr 95911698
addui 97670173
mod2BIL 103306100
fixlg 104195967
mpodd 115074559
icopyspec 117433567
togglesign_safe 125515582
real_1 129795895
subiu 131852473
subui 136825621
mpshift 153232581
dvmduBIL 165958410
shiftr 177978249
itou 178244692
addis 181551621
gc_double 184164314
vali 190380990
varncmp 217202903
gc_long 242461769
mpsub 251554245
utoineg 293977920
cgetineg 294839434
rtor 295254469
addsi 306735716
muliu 374485417
itos 462117191
shiftr_inplace 464260864
mulis 466278588
Fl_double 470781578
addir 481418951
real_0_bit 481483072
affsr 486144099
stor 486472337
mpadd 576363984
negi 636808875
itor 715068149
Fl_neg 724155295
umodsu 734171727
stoi 772646319
expu 775443619
lg2prec 800052995
mpmul 839615877
rcopy 903263898
affii 910238240
mpneg 916754068
subrr 1000260559
cgetg_copy 1480329114
cmpuu 1492963317
cgetr 1840573239
togglesign 1912478003
minss 2010223173
absi 2067475660
mpabs 2138294081
Fl_sqr_pre 2178133811
setabssign 2205004027
nbits2lg 2368103601
Fl_mul 2418971414
expi 2448502916
addrr 2880190773
remii 3005888880
adduu 3408342990
stackdummy 3636386100
Fl_mul_pre 4101325805
Fl_add 4413406432
leafcopy 4975762832
shift_right 5634432635
dvmdsBIL 7012346323
Fl_sub 7267690944
subii 7639860547
Fl_addmul_pre 7676244869
shift_left 7678130249
uutoi 8810755109
icopy 9052809190
maxss 9697837679
utoi 11895505125
addii 12409159808
evalexpo 13141783651
utoipos 14143166619
gc_const 15512015662
cgetipos 16313832382
cgetg 24554389067
cgeti 27085015417
new_chunk 93230490212
evallg 95189884200
set_avma 128986165596

Generated by: LCOV version 1.16