Visual walkthrough — Floating point gotchas — catastrophic cancellation, associativity failure
Step 1 — A number line with gaps in it
WHAT. A real number line is smooth: between any two points there is always another point. A computer's number line is not smooth. It can only land on a finite set of dots. Between neighbouring dots there is a gap — an interval with no representable number at all.
WHY. A double has a fixed budget of bits (see IEEE-754 floating point representation). Fixed bits means a finite number of dots. Everything about "lost digits" is really "your true value fell into a gap and got snapped to the nearest dot."
PICTURE. Look at the figure. Near the dots are close together; near they are far apart. The spacing is relative — it grows with the size of the number.

The single most important word here is relative: the grid is fine for small numbers and coarse for big ones.
Step 2 — Rounding: snapping to the nearest dot
WHAT. When your true value isn't one of the dots, the computer stores the nearest dot. We call the stored value (read "float of ").
WHY. You cannot store what isn't representable. Nearest-dot rounding is the least-bad choice: the error is at most half a gap, because if you were more than half a gap away, the other dot would be closer.
PICTURE. The red arrow shows the true ; the violet dot is where it lands. The error is the length of the short segment, and it can never exceed half the gap (the shaded band).

This tool — writing every stored number as true value times — is the whole reason we can track error algebraically. See Relative vs absolute error for the two flavours.
Step 3 — Two nearly-equal numbers, each carrying a wobble
WHAT. Take two exact numbers and that are close in value. The computer holds and .
WHY. We want to subtract them. Before we can, we must be honest: neither input is exact. Each already carries an absolute error and . Because and are big, these absolute errors are not tiny — they are .
PICTURE. Two tall bars, and , almost the same height. On top of each sits a small "fuzz" band — the absolute error. Notice the fuzz is a fixed fraction of the tall bar, so in absolute terms it is chunky.

Keep your eye on these two chunky fuzz-bands. They are about to survive a subtraction that shrinks the answer to nothing.
Step 4 — The subtraction: the answer shrinks, the fuzz does not
WHAT. Compute (true) versus (stored). Subtract the two lines.
WHY. This is the moment of the crime. The tall bars cancel down to a tiny sliver . But the fuzz-bands do not cancel — they were independent wobbles. So a tiny answer now sits next to fuzz that used to be small relative to but is huge relative to .
PICTURE. The two tall bars are drawn overlapping; their difference is the thin sliver at the top. The fuzz from both bars piles onto that sliver — visually the error band is a big fraction of the sliver.

Step 5 — Dividing by a tiny answer: the amplifier appears
WHAT. Ask the honest question: how bad is the relative error of the result? Divide the leftover error by the true result .
WHY. Relative error is what tells you how many correct digits remain (see Round-off error propagation). A big absolute error over a big answer is fine; a big absolute error over a tiny answer is a disaster. Division by the tiny is where the explosion happens.
PICTURE. A see-saw: numerator (fixed-size fuzz scale) on one side, denominator shrinking toward zero on the other. As the denominator collapses, the ratio shoots to the sky.

Step 6 — A worked collapse: watch the digits die
WHAT. Put numbers in. Let and , so the true difference is .
WHY. Abstract is unconvincing; a concrete digit count is not. We compute the amplification factor and predict how many digits survive.
PICTURE. The bar chart shows good digits going in and only a handful coming out, with the lost digits greyed to nothing.

Step 7 — The degenerate cases (never leave a gap)
WHAT. Sweep every boundary of the formula so no scenario surprises you.
WHY. A promise to a smart 12-year-old: you will never hit a case I did not show. Here are all of them.
PICTURE. Four mini-panels, one per case, each with the factor's value written in.

The one-picture summary
This final figure compresses all seven steps: gappy number line → snap-to-dot with fuzz → two tall bars with inherited fuzz → subtraction collapses the bars but keeps the fuzz → division by the sliver → the amplification factor → digits lost.

Recall Feynman retelling — the whole walkthrough in plain words
A computer's number line has gaps, and the gaps get wider for bigger numbers. When you write down a number, it jumps to the nearest allowed dot — that little jump is the error, and it's always about the same tiny fraction of the number.
Now take two big numbers that are almost the same. Each already jumped a little — and because they're big, those little jumps are chunky in real terms. When you subtract the two big numbers, the big parts cancel and you're left with a tiny answer... but the two chunky jumps are still there, sitting on top of a tiny answer. Suddenly the error, which was a small slice of a big number, is a huge slice of a small number.
To measure how bad it got, divide the leftover error by the tiny answer. Dividing by something tiny makes it explode. The exact "explosion factor" is : big things on top, tiny difference on the bottom. In our example that's , which eats about of your good digits.
The escape hatch: don't subtract twins. Rewrite the formula so the near-equal subtraction never happens — like for the quadratic, or . The subtraction is never wrong; it just reveals damage that was already baked in. So route around it.
Recall
Recall Cover the answers
Where does the error in actually come from? ::: It's inherited from storing ; the subtraction is exact (Sterbenz) and only exposes it.
What is the amplification factor for subtracting and ? ::: .
For , , roughly how many digits are lost? ::: About 11 (the factor is , and ).
When is subtraction perfectly safe? ::: When the numbers have opposite signs, or very different magnitudes, or one is zero — factor stays near .
Does using float128 cure catastrophic cancellation? ::: No — it lowers but leaves the amplification factor unchanged; reformulate instead.