✳flâneur — a map of the web's best reading
githublog/2024/5/29/fast-inverse-sqrt.md at main · francisrstokes/githublog
github.com · 3,950 words · saved by 1 readers
I'm sick of complex blogging solutions, so markdown files in a git repo it is - francisrstokes/githublog
Everything I Know About The Fast Inverse Square Root Algorithm The fast inverse square root algorithm , made famous (though not invented) by programming legend John Carmack in the Quake 3 source code, computes an inverse square root $\frac{1}{\sqrt{x}}$ with a bewildering handful of lines that interpret and manipulate the raw bits of float. It's wild . float Q_rsqrt ( float number ) { long i ; float x2 , y ; const float threehalfs = 1.5F ; x2 = number * 0.5F ; y = number ; i = * ( long * ) & y ; // evil floating point bit level hacking i = 0x5f3759df - ( i >> 1 ); // what the fuck? y = * ( flo
Explore this link on the map →related reading
- Math & Engineeringxn--2-umb.com
- Floating point from scratch: Hard Mode · Tales on the wireessenceia.github.io
- The Aggregate Magic Algorithmsaggregate.org
- There are Only Four Billion Floats-So Test Them All! | Random ASCII – tech blog of Bruce Dawsonrandomascii.wordpress.com
- What's new | Updates on my research and expository papers, discussion of open problems, and other maths-related topics. By Terence Taoterrytao.wordpress.com
- Why Momentum Really Worksdistill.pub
- Binary Exponentiation - Algorithms for Competitive Programmingcp-algorithms.com
- Schanuel’s conjecture and the semantics of FPSan | Complex Projective 4-Spacecp4space.hatsya.com
- Structure and Interpretation of Computer Programsmitp-content-server.mit.edu
- Labor of Division (Episode IV): Algorithm Dridiculousfish.com
- Competitive Programmer's Handbookcses.fi
- QR Decomp at the Speed of Lightml-mike.com