Home

decimal32

Decimal32 is one of the decimal floating-point formats defined by the IEEE 754-2008 standard. It represents decimal numbers with about seven decimal digits of precision, offering a compact option for decimal arithmetic in memory-constrained environments. It is part of the decimal family that also includes decimal64 (16 digits) and decimal128 (34 digits), providing different trade-offs between precision and range.

The 32-bit representation encodes a sign, an exponent, and a significand. The significand stores the decimal

Decimal32 supports the standard IEEE 754 rounding modes, including round-to-nearest with ties to even, as well

Use cases for decimal32 focus on scenarios where memory efficiency is important but decimal precision is required,

digits,
while
the
exponent
scales
the
significand
by
powers
of
ten.
There
are
two
common
encoding
forms
for
decimal32:
densely
packed
decimal
(DPD)
and
binary
integer
decimal
(BID).
In
practice,
either
encoding
may
be
used
depending
on
platform
and
library
support.
as
toward
zero,
toward
+infinity,
and
toward
−infinity.
It
provides
the
usual
special
values
such
as
Infinity,
NaN,
and
signed
zero.
As
with
other
decimal
floating-point
formats,
arithmetic
follows
rules
that
aim
to
produce
correctly
rounded
results
under
the
chosen
rounding
mode.
Operations
include
addition,
subtraction,
multiplication,
division,
and
square
root,
all
performed
in
decimal.
such
as
certain
financial
or
business
applications
with
tight
storage
constraints.
Hardware
and
software
implementations
vary;
decimal
floating-point
support
has
been
added
in
various
processor
architectures
and
numerical
libraries,
alongside
the
larger
decimal
formats
decimal64
and
decimal128,
to
accommodate
different
precision
needs
and
performance
considerations.