Work in progress: 181,232 of 181,233 sites checked so far, more every week · updated 2 Nov 2026Missing a blog? Tell us

Top all-time · #3822

C

Christian Plesner Hansen

Personal blog · h14s.p5r.org · on HN as plesnerprogrammingsystems

Christian Plesner Hansen writes Hummus and Magnets, a personal blog at h14s.p5r.org about programming and systems. Since 2014, 20 different Hacker News readers have linked it 26 times, most often “Understanding the math behind 0x5f3759df and the fast inverse square root (2012)”. It is still writing: the last post was on 2024-12-06, and you can follow it by feed.

Visit the blog
26mentions?
20HN people?
2014–2025first – last linked?
Links on Hacker News per year · peak 5 in 2014

Too few sampled comments (6) to say how often HN recommends it.?

Why HN links it

HN readers link this blog for its explanation of the math behind the fast inverse square root (0x5f3759df). Commenters cite it as a clear, intuitive treatment, and its appendix is singled out.

Summarised by Claude from a sample of 6 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.

I’m Christian Plesner Hansen. I’m a software engineer working out of Århus, Denmark. This is my technical blog.

The author on HN?

plesner · 622 karma · member since 2013

Christian Plesner Hansen Blog: http://h14s.p5r.org Website: http://c7n.p5r.org [ my public key: https://keybase.io/p5r; my proof: https://keybase.io/p5r/sigs/nc-O1JGHhVORXxZAziE3DK0gZLCDdNTbt8wfDXYmHR4 ]

From their public HN profile, which links to this site.

Most-linked posts?

  1. Understanding the math behind 0x5f3759df and the fast inverse square root (2012)
    11 people · 12 mentions · first linked 2014-10-28
  2. 0x5f3759df
    2 people · 2 mentions · first linked 2025-08-24
  3. 0x5f3759df
    2 people · 2 mentions · first linked 2017-08-15

What Hacker News says?

  1. timdierks · 2015-12-22Recommends
    Here's the best explanation I've seen: http://h14s.p5r.org/2012/09/0x5f3759df.html

    Comment linking /2012/09/0x5f3759df.html

    on “BetterExplained: Math Lessons That Explain Concepts”
  2. Submitted Understanding the math behind 0x5f3759df and the fast inverse square root (2012) as a story · 222 points

    HN discussion
  3. Babbage's notes describe what we would call branch-if-zero and branch-if-negative instructions which you could use to implement repetition. Control flow was the least well developed part of the instruction set though, presumably because it would be trivial to implement compared to the arithmetic operations so it could wait. If you're interested in that kind of thing I wrote a description of the entire instruction se…

    Comment linking /2012/11/punched-cards.html

    on “What Did Ada Lovelace’s Program Actually Do?”
  4. Submitted Why I find IEEE 754 frustrating as a story · 140 points

    HN discussion
  5. > L1. There are gaps out there. I had a similar experience. At one point I decided that I wanted to understand, step by step, how Ada Lovelace's Bernoulli program works[1]. There was a few steps that didn't seem right to me but I was sure if there were any bugs in there they would be well-known and mentioned somewhere I could find. This being one of the most iconic and historically significant programs ever written.…

    Comment linking /2012/12/bernoulli.html

    on “Surprises of the Faraday Cage”
  6. Submitted 0x5f3759df and the fast inverse square root (2012) as a story · 125 points

    HN discussion
  7. Here's another article (from 2012) describing the same calculation: http://h14s.p5r.org/2012/09/0x5f3759df.html

    Comment linking /2012/09/0x5f3759df.html

    on “Fast Inverse Square Root”
  8. Submitted Fast inverse square-root hack with magic constant 0x5f3759df (2012) as a story · 46 points

    HN discussion
  9. Carmack also started a rocket company at a time when it was much more difficult to do so (there were far fewer government dollars available via contracts), Bezos also has far more capital to put in than Carmack. Not undeservingly Carmack is something of a folk hero here (for example: http://h14s.p5r.org/2012/09/0x5f3759df.html ) but I don't think being a 10X programmer necessarily translates into great rocket compan…

    Comment linking /2012/09/0x5f3759df.html

    on “Jeff Bezos Lifts Veil on His Rocket Company, Blue Origin”
  10. Submitted The magic of the fast inverse square root (2012) as a story · 41 points

    HN discussion
  11. 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.

    Comment linking /2012/09/0x5f3759df-appendix.html

    on “Understanding the math behind 0x5f3759df and the fast inverse square root (2012)”
  12. Submitted 0x5f3759df as a story · 29 points

    HN discussion
  13. What's the algorithm for mapping between locations and names? If I wanted to integrate this into my own code how would I do that -- is there a library? Coincidentally I published a post about almost exactly the same thing only a few hours ago, http://h14s.p5r.org/2014/09/z-quads-strings.html . But it focuses more on the algorithmic side which is why I'm curious about the mechanics of UBIs.

    Comment linking /2014/09/z-quads-strings.html

    on “Show HN: Give 7 billion people a physical address”
  14. Submitted Shift/Reduce Expression Parsing as a story · 21 points

    HN discussion
  15. 1/sqrt(x) is complicated. Imagine instead of computing 1/sqrt(x), imagine instead that you wanted to compute exp_2(-.5 log_2(x)). Also imagine you have an ultra fast way to compute exp_2 and log_2. If you have an ultra fast way to compute exp_2 and log_2, then exp_2(-.5 log_2(x)) is gonna be fast to compute. It turns out you do have an ultra fast way to compute log_2: you bitcast a float to an integer, and then twid…

    Comment linking /2012/09/0x5f3759df.html

    on “A simple way to generate random points on a sphere”
  16. Submitted 0x5f3759df as a story · 6 points

    HN discussion
  17. Thanks for sharing that. I've actually been learning some Forth recently and had been wondering how a parser or a compiler might actually look using Forth, and you actually already made one, which is pretty cool. I was wondering this because deterministic parsers are often already stack based (LL and LR parsers can both be implemented as imperative programs that manipulate a stack based on the input tokens, or just…

    Comment linking /2014/10/shiftreduce-expression-parsing-by-douglas-gregor.html

    on “OBNC – Oberon-07 Compiler”
  18. Submitted Fast inverse square root, with a mystery constant (2012) as a story · 5 points

    HN discussion
  19. Here it is: http://h14s.p5r.org/2014/09/z-quads-conversions.html

    Comment linking /2014/09/z-quads-conversions.html

    on “Z-Quads, a spatial coordinate system”
  20. Submitted 0x5f3759df as a story · 4 points

    HN discussion
  21. Submitted Bitwise Division as a story · 4 points

    HN discussion
  22. Submitted Quake 3's Fast Inverse Square Root as a story · 4 points

    HN discussion
  23. Submitted 0x5f3759df: 1/sqrt(x) as a story · 3 points

    HN discussion
  24. Submitted Bigger Better Varints as a story · 2 points

    HN discussion
  25. Submitted Why 0x5f3759df? (2012) as a story · 2 points

    HN discussion
  26. Submitted Fast inverse square root and the constant 0x5f3759df (2012) as a story · 1 points

    HN discussion

Search all of HN for h14s.p5r.org

Linked by the same people?