Computers do not work with real numbers. They work with floating-point numbers — compact binary representations that store only about 15–17 significant decimal digits. Most of the time that is more than enough. But there is one operation that can turn 15 digits of precision into zero digits in a single step: subtracting two numbers that are almost equal.
Imagine computing where a = 1.23456789012345 and b = 1.23456789012344. Both numbers are accurate to 14 decimal places. But their difference is 0.00000000000001, a value that is so small that it lies at the very edge of representable precision. Every digit that was shared between and is cancelled, and only noise remains.
This phenomenon is called catastrophic cancellation, and it is not a bug in your program — it is a fundamental property of finite-precision arithmetic. The question every numerical analyst must ask is: does my formula amplify unavoidable rounding errors, or does it suppress them? Algorithms that suppress errors are called numerically stable; those that amplify them are unstable.
Understanding numerical stability is not optional. It decides whether a bridge simulation converges or diverges, whether a financial model produces cents or billions of dollars of error, and whether your GPU renders a shadow correctly or punches a hole through the floor.
Comments
Loading comments...