Underflow

Updated: 11/16/2019 by Computer Hope
Red Error key on a keyboard.

Underflow is a condition or exception that results if a number calculation is too small to be represented by the CPU (central processing unit) or memory. It may be caused by a limitation of the computer's hardware, its architecture, or the data type of the numbers used in the calculation.

Underflow in floating-point data types

In software, underflow errors occur primarily in calculations of the floating-point data type.

For example, if the computer needs to represent the number .00004, but the data type only supports four digits of numerical precision, only the first four zeros would be stored (.0000). If this condition is encountered, the computer would report an underflow error.

Often, floating-point data types represent the exponent as single, signed (positive and negative) octet. For example, the exponent of .00004 is -5, i.e., 4 x 10-5 = .00004. A single signed byte can store 256 possible exponents, the whole numbers ranging from -128 to 127. If the computer tried to store the number 4 x 10-129 in that data type, the computer would report an underflow error.

Error, Overflow, Programming terms, Zero