Floating point from scratch: Hard Mode

Deep dive and a confession
Julia Desmazes has published a sprawling, 9,392‑word walkthrough—Floating point from scratch: Hard Mode—that tries to answer a deceptively simple question: how do floating‑point numbers actually work when you build them from the silicon up? She opens with a confession: floating point once defeated her. Then she spends half a decade regrouping and returns for a rematch. The piece reads part lab notebook, part war story—equal parts math, hardware rules and humility. Recommended soundtrack? Microtonal math rock. Yes, really.
What’s in the trenches
The article methodically unpacks IEEE‑style representations and the pain points engineers actually hit: +0/−0, NaNs, infinities, denormals, gradual underflow, rounding modes and the tortuous boundary behaviors that make tests fail at 3 a.m. There are worked examples (an adder walkthrough), ASIC implementation rules, optimization notes, architecture and verification strategies, and a close look at bfloat16 and the stdfloat soft bfloat16_t. It has been reported that the project even documents a tiny tapeout on IHP26A and walks through Yosys tooling—practicalities rarely found in pure theory.
Why it matters
Floating point is one of those things everyone uses and almost nobody truly understands at the implementation level. That gap is where subtle bugs, performance surprises and verification nightmares live. Desmazes’ writeup matters because it stitches together standards, math, C++ library behavior and real silicon concerns into a single narrative—useful for hardware folks, compiler writers, and the curious programmer tired of “it works on my machine.” The emotional throughline—fear turning into hard‑won familiarity—gives the technical tour a human heartbeat.
Read the full project here: https://essenceia.github.io/projects/floating_dragon/ —bring coffee, and maybe earplugs for the microtonal math rock.
Sources: essenceia.github.io, Lobsters
Comments