HN Hall of Fame Weekly email

Understanding the math behind 0x5f3759df and the fast inverse square root (2012)

h14s.p5r.org Books & learning Tutorials & guides Computer science Candidate
Screenshot of h14s.p5r.org captured 2026-07-20
Page preview · captured 2026-07-20

Resurfaced independently across 6 calendar years, with breakout response in 2 of them.

submissions
9
submitters
9
observed span
2014–2022
peak thread · 25 comments
222 pts
latest 20+ return · 2017-08-16
222 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

Be sure to read the appendix, which is an easy-to-miss link at the end: http://h14s.p5r.org/2012/09/0x5f3759df-appendix.html The appendix was by far the most interesting part to me, after reading it I felt like I really got the intuition behind how the trick works.

If anyone wants a fast atan2 that I wrote a while ago (2007), for making a microcontroller navigate, it's at http://robots-everywhere.com/portfolio/math/

https://hn.algolia.com/?query=0x5f3759df&sort=byPopularity&p...

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
2

100+ points or 50+ comments

Total points
450

reference only — not used in Hall rules or ranking

Total comments
56

reference only — not used in Hall rules or ranking

Every submission

DateTitle as submittedByPointsComments
2014-10-280x5f3759df and the fast inverse square root (2012)First breakoutcarljoseph12525
2015-03-27Fast inverse square-root hack with magic constant 0x5f3759df (2012)shreyassaxena465
2015-07-14The magic of the fast inverse square root (2012)timdierks417
2016-10-250x5f3759df: 1/sqrt(x)wyldfire30
2016-12-140x5f3759dfmmedal60
2017-08-15Fast inverse square root and the constant 0x5f3759df (2012)siboehm10
2017-08-16Understanding the math behind 0x5f3759df and the fast inverse square root (2012)Best thread · Latest 20+ point returnColinWright22219
2020-02-01Quake 3's Fast Inverse Square Rootbbody40
2022-08-06Why 0x5f3759df? (2012)Jimmc41420