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 30719-2b7f142d49) Lines: 605 680 89.0 %
Date: 2026-02-28 09:24:01 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 14728
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33723
cmprs 40996
cgetr_block 43813
sdivsi 102151
stack_calloc 110506
gc_stoi 155885
dvdui 167195
subis 171740
Fl_ellj_pre 238067
mindd 264339
truedivis 266957
cmpri 282310
mod16 307021
Mod32 311108
uutoineg 363597
Mod16 389733
cgetg_block 424990
gc_utoi 468558
dvdiu 576268
mpdiv 665616
cmpsr 796093
rdivss 839647
real2n 1066995
addri 1106260
equalis 1151008
equalsi 1151190
gc_utoipos 1153491
real_0 1156520
mpround 1216581
umodui 1290981
absrnz_equal2n 1292616
cmpss 1392943
Mod8 2074205
mpcmp 2226354
Mod2 2370299
udivuu_rem 2418330
gc_int 2631194
mulru 2765892
subir 3005094
equaliu 3018367
equalui 3018368
itou_or_0 3146866
maxdd 3178400
cmpis 3633452
negr 3671674
cmpsi 3865452
ceildivuu 3906095
Fl_center 4486195
absrnz_equal1 4519883
real_1_bit 4704944
maxuu 4815322
mod4 5139197
umuluu_le 5803291
subri 6131285
umuluu_or_0 6155878
subsi 6182929
truedivsi 6202031
affsi 6437370
mulrs 7181596
fractor 7376923
gc_NULL 7961731
cmpir 9429164
ugcdiu 10148124
affectsign_safe 10728132
uabsdiviu_rem 11892741
cmpiu 12183707
cmpui 12183827
addrs 12305055
smodss 12714093
rdivii 13102654
rdiviiz 13145615
mpabs_shallow 13428463
utor 13461840
affur 13461959
divii 14056426
mod8 15581397
subrs 16475647
dvdii 16898328
Fl_halve 18823881
modis 19638526
int_bit 20970869
smodis 21176074
evalvalser 21529076
hammingu 24048438
abscmpiu 32682409
abscmpui 32682410
mulri 38033888
mpexpo 38870795
absequaliu 39398501
absequalui 41147392
itos_or_0 43600856
Mod4 43855731
modsi 45225577
affui 45473825
Fl_div 46593059
stack_malloc 46823205
umodi2n 49000115
sdivsi_rem 51429896
gc_ulong 52078084
gc_bool 54082960
affrr_fixlg 54653592
truedivii 54730001
stack_malloc_align 55496583
absi_shallow 58216034
mod2 61232024
Fl_addmulmul_pre 64723969
minuu 69510391
remlll_pre 76125350
evalprecp 78670829
evalvalp 81627497
mpsqr 91016239
Fl_triple 91453645
addiu 97320742
Fl_sqr 99498436
addui 100968153
fixlg 104199259
mod2BIL 106069053
mpodd 115177790
icopyspec 117471501
real_1 129866834
subiu 131921170
subui 136894015
mpshift 153229449
togglesign_safe 157217347
dvmduBIL 161451672
shiftr 178069895
itou 178232218
gc_double 184172221
addis 184513627
vali 190462820
varncmp 217195150
gc_long 242524143
mpsub 251558195
rtor 295246636
utoineg 297170516
cgetineg 298031378
addsi 309699407
muliu 375594865
Fl_double 453845321
shiftr_inplace 464254624
mulis 467029907
itos 472283928
real_0_bit 479139972
addir 481439054
affsr 486303463
stor 486550233
mpadd 574297749
negi 638026352
itor 715261439
Fl_neg 723759559
umodsu 734198840
expu 775625430
stoi 796657173
lg2prec 800252347
mpmul 837573677
rcopy 903476873
mpneg 917970366
affii 957936603
subrr 1000280165
cgetg_copy 1481418499
cmpuu 1493850049
cgetr 1841035915
togglesign 1941250818
minss 2010774221
absi 2068439090
mpabs 2139213545
Fl_sqr_pre 2155449698
setabssign 2205918938
nbits2lg 2366939128
expi 2422169622
Fl_mul 2429540422
addrr 2877973843
remii 3019848201
adduu 3445943267
stackdummy 3635042394
Fl_mul_pre 4097670089
Fl_add 4399033255
leafcopy 4978631095
shift_right 5631719680
dvmdsBIL 7030972965
Fl_sub 7238334252
subii 7676831590
Fl_addmul_pre 7685657801
shift_left 7695423053
uutoi 8935378887
icopy 9060211066
maxss 9725585600
utoi 12050695146
addii 12497077019
evalexpo 13163125481
utoipos 14256606868
gc_const 15499244598
cgetipos 16414811087
cgetg 24628279707
cgeti 27279573029
new_chunk 93670753871
evallg 95434749248
set_avma 129535012069

Generated by: LCOV version 1.16