Datasheet

Floating-point Support
ARM DUI 0067D Copyright © 1999-2001 ARM Limited. All rights reserved. 5-31
Numbers stored in the above form are called normalized numbers.
The maximum and minimum exponent values, 0 and 255, are special cases. Exponent
255 is used to represent infinity, and store Not a Number (NaN) values. Infinity can
occur as a result of dividing by zero, or as a result of computing a value that is too large
to store in this format. NaN values are used for special purposes. Infinity is stored by
setting Exp to 255 and Frac to all zeros. If Exp is 255 and Frac is nonzero, the bit pattern
represents a NaN.
Exponent 0 is used to represent very small numbers in a special way. If Exp is zero, then
the Frac field has no implicit 1 on the front. This means that the format can store 0.0, by
setting both Exp and Frac to all 0 bits. It also means that numbers that are too small to
store using Exp >= 1 are stored with less precision than the ordinary 23 bits. These are
called denormals.
Double precision
A
double
value is 64 bits wide. Figure 5-4 shows its structure.
Figure 5-4 IEEE 754 double-precision floating-point format
As before, S is the sign, Exp the exponent, and Frac the fraction. Most of the discussion
of
float
values remains true, except that:
The Exp field is biased by
0x3FF
(1023) instead of
0x7F
, so numbers between 1.0
and 2.0 have an Exp field of
0x3FF
.
The Exp value used to represent infinity and NaNs is
0x7FF
(2047) instead of
0xFF
.
63 52 5162 0
S
Exp Frac