Skip to main content
PaperadvancedFree

Miscalculating Area and Angles of a Needle-like Triangle

by William Kahan · UC Berkeley

A concrete, memorable example of an algorithm that is unstable while the problem is well-conditioned, and of how reordering operations restores accuracy, all from the field's founding authority. Case study from Kahan's numerical analysis lecture notes. Heron's formula for triangle area loses accuracy on needle-like triangles through cancellation, while a rearranged formula stays accurate. Also discusses how extra-precise arithmetic and language design affect the result.

Visit resource

More resources on Numerical Stability

WebsiteFree

Wolfram MathWorld

MathWorld is an online mathematics encyclopedia from Wolfram Research offering detailed, browsable articles on topics across the math spectrum, including algebra, geometry, calculus, and number theory. Each entry includes definitions, theorems, formulas, diagrams, worked examples, and links to further reading.

WebsiteFree

Accuracy and Stability Book Page

Companion page for Nicholas Higham's Accuracy and Stability of Numerical Algorithms (SIAM, 2nd ed.), with contents, errata, and supporting material for the standard reference on rounding error analysis, backward stability, and conditioning in floating-point computation.

WebsiteFree

Nick Higham's Numerical Analysis Blog

Blog by the late Nicholas Higham with concise expository posts on floating-point arithmetic, rounding error analysis, matrix functions, and numerical linear algebra, including his "What Is" series. Gives clear explanations of stability, conditioning, and backward error.

PaperFree

Backwards Stability of Recursive Summation (MIT 18.335 notes)

Textbooks state backward stability; this shows the full mechanics of one proof, which is the skill learners most often lack. Course notes that prove step by step that summing floating-point numbers in order is backward stable. They construct the perturbed input explicitly and bound its relative error in terms of machine epsilon. A worked template for writing stability proofs.

BookPaid

Numerical Computing with IEEE Floating Point Arithmetic (Second Edition)

Short textbook on IEEE floating-point representation, rounding, exceptions and correctly rounded operations, followed by chapters on problem conditioning and algorithm stability. The 2025 second edition adds chapters on higher-precision and lower-precision computation.

PaperFree

What Every Computer Scientist Should Know About Floating-Point Arithmetic

Survey paper from ACM Computing Surveys (1991) on IEEE 754 floating point: rounding error, ulps and relative error, guard digits, catastrophic cancellation, exactly rounded operations, and how language and compiler choices affect the accuracy of numerical code.

See all Numerical Stability resources →