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-03-01 09:23:56 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 43789
sdivsi 102151
stack_calloc 110498
gc_stoi 155889
dvdui 167195
subis 171740
Fl_ellj_pre 238065
mindd 264341
truedivis 266960
cmpri 282310
mod16 307028
Mod32 311108
uutoineg 364117
Mod16 389733
cgetg_block 425024
gc_utoi 468593
dvdiu 576265
mpdiv 665628
cmpsr 796102
rdivss 839647
real2n 1067004
addri 1106252
equalis 1151090
equalsi 1151272
gc_utoipos 1153480
real_0 1156574
mpround 1216586
umodui 1290981
absrnz_equal2n 1292615
cmpss 1392943
Mod8 2074232
mpcmp 2226383
Mod2 2370247
udivuu_rem 2418330
gc_int 2631199
mulru 2765892
subir 3005080
equaliu 3018370
equalui 3018372
itou_or_0 3146882
maxdd 3178471
cmpis 3633456
negr 3671841
cmpsi 3865455
ceildivuu 3906312
Fl_center 4486194
absrnz_equal1 4519962
real_1_bit 4705003
maxuu 4815346
mod4 5139306
umuluu_le 5803291
subri 6104526
umuluu_or_0 6174524
subsi 6182988
truedivsi 6202031
affsi 6437562
mulrs 7181596
fractor 7376927
gc_NULL 7962565
cmpir 9448520
ugcdiu 10147987
affectsign_safe 10726888
uabsdiviu_rem 11892741
cmpui 12182426
cmpiu 12182430
addrs 12305257
smodss 12750542
rdivii 13104074
rdiviiz 13146591
mpabs_shallow 13428463
utor 13461827
affur 13461936
divii 14055036
mod8 15580022
subrs 16475805
dvdii 16904812
Fl_halve 18825842
modis 19638526
int_bit 20989981
smodis 21176074
evalvalser 21529076
hammingu 24048535
abscmpui 33353087
abscmpiu 33353100
mulri 38033894
mpexpo 38873200
absequaliu 39398769
absequalui 41147661
itos_or_0 43600873
Mod4 43858611
modsi 45225572
affui 45473822
Fl_div 46575971
stack_malloc 46823428
umodi2n 49002849
sdivsi_rem 51429906
gc_ulong 52077108
gc_bool 54080093
affrr_fixlg 54654541
truedivii 54721845
stack_malloc_align 55499158
absi_shallow 58885618
mod2 61233131
Fl_addmulmul_pre 64775515
minuu 69564504
remlll_pre 76081687
evalprecp 78679678
evalvalp 81636326
mpsqr 91035747
Fl_triple 91491735
addiu 98662753
Fl_sqr 99494308
addui 102310333
fixlg 104200448
mod2BIL 106072264
mpodd 115179834
icopyspec 117471176
real_1 129851583
subiu 131925680
subui 136898664
mpshift 153228950
togglesign_safe 157229341
dvmduBIL 161434371
shiftr 178074123
itou 178232452
gc_double 184143405
addis 184518534
vali 190463410
varncmp 217195379
gc_long 242524355
mpsub 251589588
rtor 295252003
utoineg 297166775
cgetineg 298027539
addsi 309704796
muliu 375719668
Fl_double 454032027
shiftr_inplace 464295941
mulis 467039640
itos 472271336
addir 481427164
real_0_bit 481524274
affsr 486355218
stor 486583340
mpadd 576412184
negi 638057168
itor 715262314
Fl_neg 723752733
umodsu 734196929
expu 775668970
stoi 796757605
lg2prec 800297633
mpmul 839720146
rcopy 903456039
mpneg 917994115
affii 957685581
subrr 1000273738
cgetg_copy 1481436403
cmpuu 1493845458
cgetr 1841076087
togglesign 1941230870
minss 2010935093
absi 2068359840
mpabs 2139168955
Fl_sqr_pre 2157255860
setabssign 2205878269
nbits2lg 2368998156
expi 2422219395
Fl_mul 2430662283
addrr 2879964767
remii 3020790759
adduu 3447055198
stackdummy 3639177412
Fl_mul_pre 4089472216
Fl_add 4402353579
leafcopy 4978518817
shift_right 5632221603
dvmdsBIL 7031353468
Fl_sub 7244647087
Fl_addmul_pre 7673062344
subii 7677083062
shift_left 7695455998
uutoi 8935784286
icopy 9060394382
maxss 9731213338
utoi 12052050304
addii 12496946873
evalexpo 13166300223
utoipos 14257260307
gc_const 15499780310
cgetipos 16416862556
cgetg 24641507948
cgeti 27282855255
new_chunk 93682846906
evallg 95458602005
set_avma 129543692979

Generated by: LCOV version 1.16