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 30605-980f9eb85c) Lines: 605 680 89.0 %
Date: 2026-01-11 09:21:30 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 43795
sdivsi 102149
stack_calloc 110345
gc_stoi 155886
dvdui 167195
subis 170919
Fl_ellj_pre 238063
mod16 241109
mindd 264337
truedivis 266960
cmpri 282310
Mod32 311108
uutoineg 362474
Mod16 389733
cgetg_block 407176
gc_utoi 468635
dvdiu 576268
mpdiv 665625
cmpsr 796105
rdivss 839647
real2n 1067020
addri 1105788
gc_utoipos 1153483
real_0 1156462
equalis 1185557
equalsi 1185739
mpround 1216582
absrnz_equal2n 1292617
umodui 1296276
cmpss 1379853
Mod8 2073855
mpcmp 2225872
Mod2 2370136
udivuu_rem 2416412
gc_int 2631167
mulru 2765892
subir 3005072
equalui 3018187
equaliu 3018189
itou_or_0 3041720
maxdd 3178376
cmpis 3634782
negr 3671401
cmpsi 3866783
ceildivuu 3904126
Fl_center 4486072
absrnz_equal1 4519845
real_1_bit 4704843
maxuu 4815035
mod4 5083609
umuluu_or_0 5509288
umuluu_le 5803291
subsi 6093509
subri 6121094
truedivsi 6202031
affsi 6373074
mulrs 7181596
fractor 7376787
gc_NULL 7961651
cmpir 9429680
ugcdiu 10113202
cmpiu 10132975
cmpui 10133008
affectsign_safe 10727251
uabsdiviu_rem 11892741
addrs 12304769
smodss 12520495
rdivii 13102389
rdiviiz 13145786
mod8 13164134
mpabs_shallow 13428463
utor 13461793
affur 13461912
divii 14041121
subrs 16475400
dvdii 16559750
Fl_halve 18782432
modis 19638526
int_bit 20935407
smodis 21176060
evalvalser 21527935
hammingu 24048449
abscmpiu 31466473
abscmpui 31466638
mulri 38033616
mpexpo 38872256
absequaliu 39660503
absequalui 41408919
itos_or_0 43599513
Mod4 43770830
modsi 45225511
affui 45473825
Fl_div 46545673
stack_malloc 46627088
truedivii 47038892
umodi2n 48914469
sdivsi_rem 51429838
gc_bool 51982956
gc_ulong 52059147
affrr_fixlg 54652630
stack_malloc_align 55495570
absi_shallow 56516083
mod2 61113114
Fl_addmulmul_pre 64594365
minuu 69226233
remlll_pre 75787424
evalprecp 78664865
evalvalp 81622143
mpsqr 91014007
addiu 93616859
Fl_triple 94394975
Fl_sqr 95816498
addui 97260883
mod2BIL 103299783
fixlg 104196088
mpodd 115076442
icopyspec 117424815
togglesign_safe 125526265
real_1 129804933
subiu 131842735
subui 136815605
mpshift 153190133
dvmduBIL 165653990
shiftr 177966943
itou 178232950
addis 181568026
gc_double 184144147
vali 190377702
varncmp 217203103
gc_long 242314362
mpsub 251514562
utoineg 293948878
cgetineg 294810489
rtor 295240216
addsi 306752207
muliu 374363932
itos 462159933
shiftr_inplace 464188840
mulis 466276435
Fl_double 468626847
real_0_bit 479015849
addir 481416747
affsr 486080285
stor 486451640
mpadd 574197842
negi 636909784
itor 714717410
Fl_neg 719282595
umodsu 723952912
stoi 772654531
expu 775363495
lg2prec 799788729
mpmul 837351343
rcopy 903189975
affii 910306716
mpneg 916825646
subrr 1000100849
cgetg_copy 1480090184
cmpuu 1492610905
cgetr 1840009839
togglesign 1912144362
minss 2009423699
absi 2068335953
mpabs 2139108167
Fl_sqr_pre 2173801026
setabssign 2205834220
nbits2lg 2365529564
Fl_mul 2416367090
expi 2448472066
addrr 2876596925
remii 3004329904
adduu 3406825396
stackdummy 3632479839
Fl_mul_pre 4087796187
Fl_add 4396480098
leafcopy 4973707107
shift_right 5631318945
dvmdsBIL 7009425537
Fl_sub 7241458942
subii 7653756977
Fl_addmul_pre 7666807574
shift_left 7675177203
uutoi 8806005876
icopy 9051491594
maxss 9676705704
utoi 11893819370
addii 12403599984
evalexpo 13132245440
utoipos 14141167026
gc_const 15508882639
cgetipos 16306668422
cgetg 24530482877
cgeti 27090554657
new_chunk 93192386138
evallg 95163469259
set_avma 128938147584

Generated by: LCOV version 1.16