Floating-point arithmetic and error analysis
General · Mathematics
Study notes
Q: Explain catastrophic cancellation in √(10⁸+1)-10⁴. Compute stably. Direct: √(100000001) ≈ 10000.00005: subtract: 0.00005 (loses digits!). Double: 10000.00005-10000 = 5e-5 (few correct digits!). Stable: multiply conjugate: 1/(√(10⁸+1)+10⁴). = 1/20000.00005 ≈ 5e-5 (full precision!)! (Cancellation: reformulate!)