So why use denormalized numbers at all? It costs time to normalize the denormalized result of an operation; if you know the loss of precision is not significant to your computation, you may not want to pay the price, especially in an inner loop of a vector or matrix operation. Also, you can get a few extra bits of exponent (read: dynamic range of the value) in trade for the loss of mantissa precision.
The primary reason for denormalized numbers is to provide gradual underflow. Denormalized numbers allow for some additional values between zero and the smallest normalized number greater than zero.
Rick Zaccone
Rick Zaccone zaccone@bucknell.edu writes:
The primary reason for denormalized numbers is to provide gradual underflow. Denormalized numbers allow for some additional values between zero and the smallest normalized number greater than zero.
Quite true. Unfortunately, using denormalization properly for gradual under/overflow is problematic for some IEEE 754 implementations, or at least it was a few years ago when I was last involved with this stuff. Some implementors seemed to feel this feature was of dubious utility, and not worth the performance impact of detecting the condition. ----------------------------------------------------------------------------- "Designers are pretty bright people, however. They can come up with a plausible-sounding example for almost anything." - Donald Norman ----------------------------------------------------------------------------- Bruce Cohen, | email: cohenb@gemstone.com GemStone Systems, Inc. | phone: (503)533-3602 20575 NW Von Neumann Drive | fax: (503)629-8556 Beaverton, OR USA 97006 | web: http://www.gemstone.com
squeak-dev@lists.squeakfoundation.org