Hardware Reference
In-Depth Information
Item
Single precision
Double precision
Bits in sign
1
1
Bits in exponent
8
11
Bits in fraction
23
52
Bits, total
32
64
Exponent system
Excess 127
Excess 1023
Exponent range
126 to +127
1022 to +1023
2 126
2 1022
Smallest normalized number
approx. 2 128
approx. 2 1024
Largest normalized number
approx. 10 38 to 10 38
approx. 10 308 to 10 308
Decimal range
approx. 10 45
approx. 10 324
Smallest denormalized number
Figure B-5. Characteristics of IEEE floating-point numbers.
Normalized
±
0
<
Exp
<
Max
Any bit pattern
Denormalized
±
0
Any nonzero bit pattern
Zero
±
0
0
Infinity
±
1 1 1…1
0
Not a number
±
1 1 1…1
Any nonzero bit pattern
Sign bit
Figure B-6. IEEE numerical types.
really satisfactory, so IEEE invented denormalized numbers . These numbers
have an exponent of 0 and a fraction given by the following 23 or 52 bits. The
implicit 1 bit to the left of the binary point now becomes a 0. Denormalized num-
bers can be distinguished from normalized ones because the latter are not permit-
ted to have an exponent of 0.
The smallest normalized single precision number hasa1asexponent and 0 as
fraction, and represents 1. 0
2 −126 . The largest denormalized number hasa0as
exponent and all 1s in the fraction, and represents about 0. 9999999
×
2 −126 , which
is almost the same thing. One thing to note however, is that this number has only
23 bits of significance, versus 24 for all normalized numbers.
As calculations further decrease this result, the exponent stays put at 0, but the
first few bits of the fraction become zeros, reducing both the value and the number
of significant bits in the fraction. The smallest nonzero denormalized number con-
sists ofa1intherightmost bit, with the rest being 0. The exponent represents
×
 
Search WWH ::




Custom Search