<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
subnormal	B-Algorithm
numbers	I-Algorithm
are	O
the	O
subset	O
of	O
denormalized	B-Algorithm
numbers	I-Algorithm
(	O
sometimes	O
called	O
denormals	B-Algorithm
)	O
that	O
fill	O
the	O
underflow	B-Algorithm
gap	O
around	O
zero	O
in	O
floating-point	B-Algorithm
arithmetic	I-Algorithm
.	O
</s>
<s>
Any	O
non-zero	O
number	O
with	O
magnitude	O
smaller	O
than	O
the	O
smallest	O
normal	B-Algorithm
number	I-Algorithm
is	O
subnormal	O
.	O
</s>
<s>
Usage	O
note	O
:	O
in	O
some	O
older	O
documents	O
(	O
especially	O
standards	O
documents	O
such	O
as	O
the	O
initial	O
releases	O
of	O
IEEE	O
754	O
and	O
the	O
C	O
language	O
)	O
,	O
"	O
denormal	B-Algorithm
"	O
is	O
used	O
to	O
refer	O
exclusively	O
to	O
subnormal	B-Algorithm
numbers	I-Algorithm
.	O
</s>
<s>
This	O
usage	O
persists	O
in	O
various	O
standards	O
documents	O
,	O
especially	O
when	O
discussing	O
hardware	O
that	O
is	O
incapable	O
of	O
representing	O
any	O
other	O
denormalized	B-Algorithm
numbers	I-Algorithm
,	O
but	O
the	O
discussion	O
here	O
uses	O
the	O
term	O
subnormal	O
in	O
line	O
with	O
the	O
2008	O
revision	O
of	O
IEEE	O
754	O
.	O
</s>
<s>
In	O
a	O
normal	O
floating-point	B-Algorithm
value	O
,	O
there	O
are	O
no	O
leading	O
zeros	O
in	O
the	O
significand	O
(	O
mantissa	O
)	O
;	O
rather	O
,	O
leading	O
zeros	O
are	O
removed	O
by	O
adjusting	O
the	O
exponent	O
(	O
for	O
example	O
,	O
the	O
number	O
0.0123	O
would	O
be	O
written	O
as	O
)	O
.	O
</s>
<s>
Conversely	O
,	O
a	O
denormalized	O
floating	B-Algorithm
point	I-Algorithm
value	I-Algorithm
has	O
a	O
significand	O
with	O
a	O
leading	B-Architecture
digit	I-Architecture
of	O
zero	O
.	O
</s>
<s>
Of	O
these	O
,	O
the	O
subnormal	B-Algorithm
numbers	I-Algorithm
represent	O
values	O
which	O
if	O
normalized	O
would	O
have	O
exponents	O
below	O
the	O
smallest	O
representable	O
exponent	O
(	O
the	O
exponent	O
having	O
a	O
limited	O
range	O
)	O
.	O
</s>
<s>
The	O
significand	O
(	O
or	O
mantissa	O
)	O
of	O
an	O
IEEE	O
floating-point	B-Algorithm
number	I-Algorithm
is	O
the	O
part	O
of	O
a	O
floating-point	B-Algorithm
number	I-Algorithm
that	O
represents	O
the	O
significant	B-Architecture
digits	I-Architecture
.	O
</s>
<s>
For	O
a	O
positive	O
normalised	O
number	O
it	O
can	O
be	O
represented	O
as	O
m1m2m3	O
...	O
mp	O
−2mp−1	O
(	O
where	O
m	O
represents	O
a	O
significant	B-Architecture
digit	I-Architecture
,	O
and	O
p	O
is	O
the	O
precision	B-Architecture
)	O
with	O
non-zero	O
m0	O
.	O
</s>
<s>
In	O
a	O
subnormal	B-Algorithm
number	I-Algorithm
,	O
since	O
the	O
exponent	O
is	O
the	O
least	O
that	O
it	O
can	O
be	O
,	O
zero	O
is	O
the	O
leading	B-Architecture
significant	I-Architecture
digit	I-Architecture
(	O
m1m2m3	O
...	O
mp	O
−2mp−1	O
)	O
,	O
allowing	O
the	O
representation	O
of	O
numbers	O
closer	O
to	O
zero	O
than	O
the	O
smallest	O
normal	B-Algorithm
number	I-Algorithm
.	O
</s>
<s>
A	O
floating-point	B-Algorithm
number	I-Algorithm
may	O
be	O
recognized	O
as	O
subnormal	O
whenever	O
its	O
exponent	O
is	O
the	O
least	O
value	O
possible	O
.	O
</s>
<s>
By	O
filling	O
the	O
underflow	B-Algorithm
gap	O
like	O
this	O
,	O
significant	B-Architecture
digits	I-Architecture
are	O
lost	O
,	O
but	O
not	O
as	O
abruptly	O
as	O
when	O
using	O
the	O
flush	O
to	O
zero	O
on	O
underflow	B-Algorithm
approach	O
(	O
discarding	O
all	O
significant	B-Architecture
digits	I-Architecture
when	O
underflow	B-Algorithm
is	O
reached	O
)	O
.	O
</s>
<s>
Hence	O
the	O
production	O
of	O
a	O
subnormal	B-Algorithm
number	I-Algorithm
is	O
sometimes	O
called	O
gradual	B-Algorithm
underflow	I-Algorithm
because	O
it	O
allows	O
a	O
calculation	O
to	O
lose	O
precision	B-Architecture
slowly	O
when	O
the	O
result	O
is	O
small	O
.	O
</s>
<s>
In	O
IEEE	O
754-2008	O
,	O
denormal	B-Algorithm
numbers	I-Algorithm
are	O
renamed	O
subnormal	B-Algorithm
numbers	I-Algorithm
and	O
are	O
supported	O
in	O
both	O
binary	O
and	O
decimal	O
formats	O
.	O
</s>
<s>
In	O
binary	O
interchange	O
formats	O
,	O
subnormal	B-Algorithm
numbers	I-Algorithm
are	O
encoded	O
with	O
a	O
biased	B-Algorithm
exponent	I-Algorithm
of	O
0	O
,	O
but	O
are	O
interpreted	O
with	O
the	O
value	O
of	O
the	O
smallest	O
allowed	O
exponent	O
,	O
which	O
is	O
one	O
greater	O
(	O
i.e.	O
,	O
as	O
if	O
it	O
were	O
encoded	O
as	O
a	O
1	O
)	O
.	O
</s>
<s>
Mathematically	O
speaking	O
,	O
the	O
normalized	O
floating-point	B-Algorithm
numbers	I-Algorithm
of	O
a	O
given	O
sign	O
are	O
roughly	O
logarithmically	O
spaced	O
,	O
and	O
as	O
such	O
any	O
finite-sized	O
normal	O
float	B-Algorithm
cannot	O
include	O
zero	O
.	O
</s>
<s>
The	O
subnormal	O
floats	B-Algorithm
are	O
a	O
linearly	O
spaced	O
set	O
of	O
values	O
,	O
which	O
span	O
the	O
gap	O
between	O
the	O
negative	O
and	O
positive	O
normal	O
floats	B-Algorithm
.	O
</s>
<s>
Subnormal	B-Algorithm
numbers	I-Algorithm
provide	O
the	O
guarantee	O
that	O
addition	O
and	O
subtraction	O
of	O
floating-point	B-Algorithm
numbers	I-Algorithm
never	O
underflows	B-Algorithm
;	O
two	O
nearby	O
floating-point	B-Algorithm
numbers	I-Algorithm
always	O
have	O
a	O
representable	O
non-zero	O
difference	O
.	O
</s>
<s>
Without	O
gradual	B-Algorithm
underflow	I-Algorithm
,	O
the	O
subtraction	O
a−b	O
can	O
underflow	B-Algorithm
and	O
produce	O
zero	O
even	O
though	O
the	O
values	O
are	O
not	O
equal	O
.	O
</s>
<s>
This	O
can	O
,	O
in	O
turn	O
,	O
lead	O
to	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
errors	O
that	O
cannot	O
occur	O
when	O
gradual	B-Algorithm
underflow	I-Algorithm
is	O
used	O
.	O
</s>
<s>
Subnormal	B-Algorithm
numbers	I-Algorithm
were	O
implemented	O
in	O
the	O
Intel	B-Device
8087	I-Device
while	O
the	O
IEEE	O
754	O
standard	O
was	O
being	O
written	O
.	O
</s>
<s>
They	O
were	O
by	O
far	O
the	O
most	O
controversial	O
feature	O
in	O
the	O
K-C-S	O
format	O
proposal	O
that	O
was	O
eventually	O
adopted	O
,	O
but	O
this	O
implementation	O
demonstrated	O
that	O
subnormal	B-Algorithm
numbers	I-Algorithm
could	O
be	O
supported	O
in	O
a	O
practical	O
implementation	O
.	O
</s>
<s>
Some	O
implementations	O
of	O
floating-point	B-General_Concept
units	I-General_Concept
do	O
not	O
directly	O
support	O
subnormal	B-Algorithm
numbers	I-Algorithm
in	O
hardware	O
,	O
but	O
rather	O
trap	O
to	O
some	O
kind	O
of	O
software	O
support	O
.	O
</s>
<s>
While	O
this	O
may	O
be	O
transparent	O
to	O
the	O
user	O
,	O
it	O
can	O
result	O
in	O
calculations	O
that	O
produce	O
or	O
consume	O
subnormal	B-Algorithm
numbers	I-Algorithm
being	O
much	O
slower	O
than	O
similar	O
calculations	O
on	O
normal	B-Algorithm
numbers	I-Algorithm
.	O
</s>
<s>
When	O
subnormal	O
values	O
are	O
entirely	O
computed	O
in	O
hardware	O
,	O
implementation	O
techniques	O
exist	O
to	O
allow	O
their	O
processing	O
at	O
speeds	O
comparable	O
to	O
normal	B-Algorithm
numbers	I-Algorithm
.	O
</s>
<s>
Some	O
applications	O
need	O
to	O
contain	O
code	O
to	O
avoid	O
subnormal	B-Algorithm
numbers	I-Algorithm
,	O
either	O
to	O
maintain	O
accuracy	O
,	O
or	O
in	O
order	O
to	O
avoid	O
the	O
performance	O
penalty	O
in	O
some	O
processors	O
.	O
</s>
<s>
Other	O
methods	O
of	O
preventing	O
subnormal	B-Algorithm
numbers	I-Algorithm
include	O
adding	O
a	O
DC	O
offset	O
,	O
quantizing	O
numbers	O
,	O
adding	O
a	O
Nyquist	O
signal	O
,	O
etc	O
.	O
</s>
<s>
Since	O
the	O
SSE2	B-General_Concept
processor	O
extension	O
,	O
Intel	O
has	O
provided	O
such	O
a	O
functionality	O
in	O
CPU	O
hardware	O
,	O
which	O
rounds	O
subnormal	B-Algorithm
numbers	I-Algorithm
to	O
zero	O
.	O
</s>
<s>
Intel	O
's	O
C	O
and	O
Fortran	O
compilers	O
enable	O
the	O
(	O
denormals-are-zero	O
)	O
and	O
(	O
flush-to-zero	O
)	O
flags	O
for	O
SSE	O
by	O
default	O
for	O
optimization	O
levels	O
higher	O
than	O
.	O
</s>
<s>
The	O
effect	O
of	O
is	O
to	O
treat	O
subnormal	O
input	O
arguments	O
to	O
floating-point	B-Algorithm
operations	O
as	O
zero	O
,	O
and	O
the	O
effect	O
of	O
is	O
to	O
return	O
zero	O
instead	O
of	O
a	O
subnormal	O
float	B-Algorithm
for	O
operations	O
that	O
would	O
result	O
in	O
a	O
subnormal	O
float	B-Algorithm
,	O
even	O
if	O
the	O
input	O
arguments	O
are	O
not	O
themselves	O
subnormal	O
.	O
</s>
<s>
clang	B-Application
and	O
gcc	B-Application
have	O
varying	O
default	O
states	O
depending	O
on	O
platform	O
and	O
optimization	O
level	O
.	O
</s>
<s>
A	O
non-C99-compliant	O
method	O
of	O
enabling	O
the	O
and	O
flags	O
on	O
targets	O
supporting	O
SSE	O
is	O
given	O
below	O
,	O
but	O
is	O
not	O
widely	O
supported	O
.	O
</s>
<s>
It	O
is	O
known	O
to	O
work	O
on	O
Mac	B-Operating_System
OS	I-Operating_System
X	I-Operating_System
since	O
at	O
least	O
2006	O
.	O
</s>
