Numerical Methods / Approximation and error
Floating-Point Arithmetic and Error
Computers store finitely many numbers. Learn where rounding hurts and how to avoid catastrophic cancellation.
Contents 2 sections
By the end you can
- Describe floating-point representation and machine epsilon
- Distinguish absolute and relative error
- Recognise and repair catastrophic cancellation
§1A finite number line
A double-precision number stores a sign, 53 bits of significand and an exponent: about 16 decimal digits. Machine epsilon, roughly , is the gap between 1 and the next representable number. That is why in most languages.
Check yourself
- Q1Double precision carries roughly how many significant decimal digits?