Real Numbers: Underflow and overflow

From Wikibooks, open books for an open world
Jump to navigation Jump to search

PAPER 2 - ⇑ Fundamentals of data representation ⇑

← Rounding errors Underflow and overflow Floating point numbers →

TODOː Absolute and Relative errors

From the Specification : Fundmentals of Data Representation
  • Explain underflow and overflow and describe the circumstances in which they occur.

Underflow[edit | edit source]

When a number or the result of an equation is too small, you might not have enough digits in your mantissa and exponent to show it. In the following example the number would register as 0

Try and show 0.0000000000000000000000000001 in 12 bit FP

Overflow[edit | edit source]

When the result of a sum is too large to be represented by your number system you might run out of space to represent it and end up storing a much smaller number

Try and show 99,999,999,999,999,999,999 in 12 bit FP