Arithmetic underflow
From Wikipedia, the free encyclopedia
Arithmetic underflow (or "floating point underflow", "floating underflow", "underflow") is a condition that can occur when the result of a floating point operation would be smaller in magnitude (closer to zero, either positive or negative) than the smallest quantity representable. Underflow is actually (negative) overflow of the exponent of the floating point quantity. For example, an eight-bit two's complement exponent can represent multipliers of 2 − 128 to 2127. A result less than 2 − 128 would cause underflow.
Depending on the processor, the programming language and the run-time system, underflow may set a status bit, raise an exception, generate a hardware interrupt, or may cause some combination of these effects. Alternatively, the underflow may just be ignored and zero substituted for the unrepresentable value, although this might lead to a later division by zero error which cannot be so easily ignored.
As specified in IEEE 754 the underflow condition is only signalled 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.
[edit] See also
[edit] References
- This article was originally based on material from the Free On-line Dictionary of Computing, which is licensed under the GFDL.