Share on Facebook Share on Twitter Email
Answers.com

Arithmetic underflow

 
Computer Desktop Encyclopedia: arithmetic underflow

The result from an arithmetic calculation that is too small to be expressed properly. For example, in floating point, a negative exponent can be generated that is too large (too small a number) to be stored in its allotted space.

Download Computer Desktop Encyclopedia to your iPhone/iTouch

Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
Wikipedia: Arithmetic underflow
Top

The term arithmetic underflow (or "floating point underflow", or just "underflow") is a condition in a computer program that can occur when the true result of a floating point operation is smaller in magnitude (that is, closer to zero) than the smallest value representable as a normal floating point number in the target datatype. Underflow can in part be regarded as negative overflow of the exponent of the floating point value. For example, if the exponent part can represent values from −128 to 127, then a result with absolute value less than 2−127 may cause underflow (assuming that the exponent −128 is reserved for values like 0 which have no "normal" representation).

The underflow gap

The interval between −fminN and fminN, where fminN is the smallest positive normal floating point value, is called the underflow gap. This is because the size of this interval is many orders of magnitude larger than the distance between adjacent normal floating point values just outside of the gap. For instance, if the floating point datatype can represent 20 binary digits, the underflow gap is 221 times larger than the absolute distance between adjacent floating point values just outside of the gap.

In older designs, the underflow gap had just one usable value, zero. When an underflow occurred, the true result was replaced by zero (either directly by the hardware, or by system software handling the primary underflow condition). This replacement is called flush to zero (on underflow).

The 1984 edition of IEEE 754 introduced subnormal numbers. The subnormal numbers (including zero) fill the underflow gap with values where the absolute distance between adjacent values is the same as for adjacent values just outside of the underflow gap. This enables gradual underflow where a (nearest) subnormal value is used, just as a nearest normal value is used when possible. Note that even when using gradual underflow, the nearest value may be zero.

Handling of underflow

The occurrence of an underflow may set a ('sticky') status bit, raise an exception, at the hardware level generate an interrupt, or may cause some combination of these effects.

As specified in IEEE 754 the underflow condition is only signaled if there is also a loss of accuracy. Typically this is determined as the final result being inexact. However if the user is trapping on underflow, this may happen regardless of consideration for loss of precision. The default handling in IEEE 754 for underflow (as well as other exceptions) is to record as a floating point status that underflow has occurred. This is specified for the application programming level, but often also interpreted as how to handle it at the hardware level.

See also


 
 

 

Copyrights:

Computer Desktop Encyclopedia. THIS DEFINITION IS FOR PERSONAL USE ONLY.
All other reproduction is strictly prohibited without permission from the publisher.
© 1981-2010 The Computer Language Company Inc.  All rights reserved.  Read more
Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Arithmetic underflow" Read more