Quake III's fast inverse square root returns negatives when compiled with gcc -O1 on 64-bit Linux
tetsuoai · x · 2026-09-25
A developer compiled Quake III's famous fast inverse square root with gcc -O1 on 64-bit Linux and got negative results. The culprit: the long pointer cast reads past the float into stack memory, and the low bit of the return address lands in the sign bit — a concrete case of the classic hack's reliance on undefined behavior breaking on modern toolchains.
More from Fun
- Wittgenstein as the mirror image of an Effective Altruist: give your fortune to the richest — birchlse · 2026-09-25
- Claude Opus 5.5 Autonomously Creates Short Film 'Something It Is Like' and Names a Chapter 'Mind' — RileyRalmuto · 2026-09-25
- Opus one-shots an interactive lens lab in 86 minutes for $25.66 — Promptmethus · 2026-09-25
- 6,300 frames of Su Shi's life: an MV animated entirely with Claude Opus 5.5 — dotey · 2026-09-25
- Opus 5.5 reportedly builds an explorable Atlantis world in TwoJS in two hours, hinting at 'Generative Experiences' — Promptmethus · 2026-09-25
- Generational wealth in 2040: a grandfathered AI plan with unlimited tokens — CtrlAltDwayne · 2026-09-25