3.2 Denormalized Numbers

   

 
Java Number Cruncher: The Java Programmer's Guide to Numerical Computing
By Ronald  Mak

Table of Contents
Chapter  3.   The Floating-Point Standard

3.2 Denormalized Numbers

Why do we need denormalized numbers?

Recall that, in Chapter 1, we observed that the floating-point numbers are not evenly distributed along the number line. They are densest near 0, and the size of the gaps between successive numbers increases exponentially as the exponent value increases . In the IEEE 754 standard, the base of the exponent is 2, and so the gaps double in size with each increment of the exponent value.

The smallest positive normalized float value has

graphics/03equ17.gif


Then

graphics/03equ18.gif


and the significand is binary 1.00000000000000000000000. The value is

graphics/03equ19.gif


Without the denormalized numbers, the next smaller number is 0. When computing with extremely small numbers, this gap causes a "flush to zero."

The largest possible denormalized float value has

graphics/03equ20.gif


and the significand is binary 0.11111111111111111111111. Its value is

graphics/03equ21.gif


So the largest possible denormalized float value is slightly less than the smallest positive normalized float value; since we already know that the smallest possible positive denormalized float value is approximately 1.4 x 10 - 45 , the denormalized values help fill in the gap between 0 and the smallest possible normalized float value.

Thus, Java supports the more elegant "gradual underflow." As computed values get smaller and smaller, they become denormalized. Thus, instead of having the values abruptly flush to zero, there is a smoother approach to 0.


   
Top
 


Java Number Cruncher. The Java Programmer's Guide to Numerical Computing
Java Number Cruncher: The Java Programmers Guide to Numerical Computing
ISBN: 0130460419
EAN: 2147483647
Year: 2001
Pages: 141
Authors: Ronald Mak

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net