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 30735-65f72320ad) Lines: 607 680 89.3 %
Date: 2026-03-13 09:24:04 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 10374
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33730
cmprs 40996
cgetr_block 43800
sdivsi 102149
stack_calloc 110570
gc_stoi 155904
dvdui 167195
subis 171739
Fl_ellj_pre 238053
mindd 264381
truedivis 266975
cmpri 282310
mod16 307028
Mod32 311108
uutoineg 363094
Mod16 389733
cgetg_block 425308
gc_utoi 468751
dvdiu 576277
mpdiv 665532
cmpsr 796106
rdivss 839647
real2n 1067480
addri 1106265
equalis 1150990
equalsi 1151172
gc_utoipos 1153586
real_0 1156567
mpround 1216590
umodui 1290953
absrnz_equal2n 1292558
cmpss 1392943
Mod8 2074268
mpcmp 2226364
Mod2 2370258
udivuu_rem 2418379
gc_int 2631179
mulru 2765892
subir 3004978
equaliu 3018907
equalui 3018932
itou_or_0 3147027
maxdd 3179547
cmpis 3633566
negr 3671771
cmpsi 3865567
ceildivuu 3904521
Fl_center 4486109
absrnz_equal1 4520278
real_1_bit 4707258
maxuu 4815190
mod4 5139328
umuluu_le 5803291
subri 6094921
umuluu_or_0 6162804
subsi 6182919
truedivsi 6202031
affsi 6439671
mulrs 7181596
fractor 7376928
gc_NULL 7962746
cmpir 9438302
ugcdiu 10146859
affectsign_safe 10729128
uabsdiviu_rem 11892741
cmpiu 12178598
cmpui 12178611
addrs 12305217
smodss 12630255
rdivii 13101284
rdiviiz 13143576
mpabs_shallow 13428463
utor 13463057
affur 13463171
divii 14050016
mod8 15575634
subrs 16478260
dvdii 16903815
Fl_halve 18820960
modis 19638526
int_bit 20941758
smodis 21176081
evalvalser 21529069
hammingu 24048752
abscmpiu 31613672
abscmpui 31613879
mulri 38033870
mpexpo 38878115
absequaliu 39352883
absequalui 41101798
itos_or_0 43600657
Mod4 43857884
modsi 45225680
affui 45473825
Fl_div 46572787
stack_malloc 46825354
umodi2n 49002240
sdivsi_rem 51430009
gc_ulong 52061055
affrr_fixlg 54654499
truedivii 54697856
stack_malloc_align 55525990
absi_shallow 55582098
gc_bool 56144517
mod2 61230385
Fl_addmulmul_pre 64661447
minuu 69559300
remlll_pre 76233946
evalprecp 78669197
evalvalp 81625794
mpsqr 91040011
Fl_triple 91274087
addiu 95192884
addui 98840370
Fl_sqr 99447427
fixlg 104200737
mod2BIL 106061539
mpodd 115175174
icopyspec 117468434
real_1 129868296
subiu 131921955
subui 136896397
mpshift 153326729
togglesign_safe 157180892
dvmduBIL 161334246
shiftr 178083225
itou 178236983
gc_double 184185337
addis 184535471
vali 190426642
varncmp 198517044
gc_long 242530481
mpsub 251586606
rtor 295305551
utoineg 297183532
cgetineg 298044803
addsi 309720986
muliu 375478657
Fl_double 453230347
shiftr_inplace 464413189
mulis 467012465
itos 472263064
real_0_bit 477921697
addir 481452063
affsr 486248690
stor 486565318
mpadd 573133646
negi 640307471
itor 715309670
Fl_neg 723649212
umodsu 734162772
expu 775692965
stoi 796655577
lg2prec 800367567
mpmul 836420137
rcopy 903492118
mpneg 920321661
affii 957367278
subrr 1000362522
cgetg_copy 1487233720
cmpuu 1490447991
cgetr 1840956533
togglesign 1943435518
minss 2009459996
absi 2065902349
mpabs 2136756689
Fl_sqr_pre 2155330813
setabssign 2203444134
nbits2lg 2366049948
expi 2421882831
Fl_mul 2425936921
addrr 2876629460
remii 3018223461
adduu 3441979930
stackdummy 3647173703
Fl_mul_pre 4085754878
Fl_add 4395724296
leafcopy 4978514500
shift_right 5633402420
dvmdsBIL 7031081342
Fl_sub 7209137471
Fl_addmul_pre 7669560785
subii 7682616606
shift_left 7694054242
uutoi 8924376694
icopy 9057959251
maxss 9692786095
utoi 12035958489
addii 12541492307
evalexpo 13159709011
utoipos 14247651148
gc_const 15582449075
cgetipos 16408352948
cgetg 24504110771
cgeti 27259093259
new_chunk 93511386256
evallg 95321009606
set_avma 129481573751

Generated by: LCOV version 1.16