Low Latency Trading Insights

Low Latency Trading Insights

This One Rounding Error Killed 28 People. Here's What Every Developer Must Know About Floating-Point.

The Hidden Complexity of Floating-Point Arithmetic (Part 2)

Henrique Bucher's avatar
Henrique Bucher
Jan 17, 2026
∙ Paid

Advanced problems and practical solutions for numerical computing

Introduction: When Small Errors Become Disasters

In Part 1, we explored the foundations of floating-point arithmetic: how IEEE 754 represents numbers as sign, exponent, and mantissa; why decimal fractions like 0.1 can’t be represented exactly in binary; the critical concept of machine epsilon; and how guard digits enable correct rounding. We saw how hardware implementations vary—from x87’s 80-bit extended precision to SSE/AVX’s strict IEEE compliance—and discovered that basic algebraic properties like associativity and distributivity don’t always hold in floating-point arithmetic.

But understanding the architecture and sources of error is just the beginning. The real danger in numerical computing comes when these small, seemingly harmless errors compound into catastrophically wrong results. A few parts-per-trillion error in a single operation might be negligible, but subtract two nearly-equal numbers containing those errors, or sum a million values, and suddenly you’re looking at answers that are completely wrong.

This is where numerical analysis becomes essential. In Part 2, we’ll explore the failure modes that lurk in everyday numerical code and the battle-tested techniques for defeating them. We’ll see how the quadratic formula you learned in school can produce completely wrong roots, how summing a million numbers naively can accumulate devastating errors, and how special values like NaN and infinity propagate through calculations. Most importantly, we’ll learn the practical algorithms—compensated summation, stable formula reformulation, careful magnitude ordering—that professional numerical programmers use to write code that’s both fast and correct.

Let’s dive into the dark side of floating-point arithmetic.

User's avatar

Continue reading this post for free, courtesy of Henrique Bucher.

Or purchase a paid subscription.
© 2026 Henrique Bucher · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture