Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    C

    Chris Lomont

    lomont.org · Personal blog · on HN since 2007

    Chris Lomont, a physicist and programmer, writes technical papers on numerical methods, math in everyday devices, and software oddities.

    Visit blogRSSHN submissions
    MathProgrammingSystems & Performance
    What HN says

    HN commenters point to his paper on the fast inverse square root as the best explanation of the magic constant 0x5f3759df and its history.

    Stats for nerds
    20HN people shared it
    7linked in comments
    15story points
    Apr 2026last shared
    2008people per year2026

    Top posts on HN

    1. 1
      Fast Inverse Square Root [pdf]
      10 people · 6 points · first shared 2008 · 1 comments on HN
    2. 2
      Fast Inverse Square Root [pdf]
      1 person · 2 points · first shared 2020 · Discussion on HN
    3. 3
      Accurate int/float colour conversions
      1 person · 2 points · first shared 2026 · Discussion on HN
    4. 4
      The Excel Bug Disassembled [pdf]
      1 person · 2 points · first shared 2007 · Discussion on HN
    5. 5
      How much Math is there in an iPhone?
      1 person · 2 points · first shared 2011 · Discussion on HN
    6. 6
      Efficient Divisibility Testing (2017)
      1 person · 1 points · first shared 2025 · 1 comments on HN
    7. 7
      Fractran
      1 person · first shared 2024
    8. 8
      Robotron
      1 person · first shared 2017
    9. 9
      Excel2007Bug.pdf
      1 person · first shared 2023
    10. 10
      CompareFloat.pdf
      1 person · first shared 2026

    What HN people wrote when they linked it

    • ChrisLomontAug 2020

      >>time dialation (something completely alien to all before him

      >Hendrik Lorentz prop

      Lorentz did not think that time actually dilated; his notion of "local time" he considered purely a mathematical trick, unrelated to actual physics, in the same manner that renormalization sweeps away infinities in a clever manner.

      Here's the quote: "While for Lorentz length contraction was a real physical effect, he considered the time transformation only as a heuristic working hypothesis and a mathematical stipulation to simplify the calculation from the resting to a "fictitious" moving system. " [1]

      So no, Lorentz absolutely did not think physical time actually dilated. Stop repeating this nonsense.

      Also, Lorentz was not the first to publish the time dilation formula. And, like Lorentz, all before him thought it a neat mathematical trick, devoid of actual physics.

      Poincare did think it may be actual time dilation, but he too lacked the insights that Einstein had that put these dilation and stretching concepts not as ad-hoc after effects, but that they come from a simple, single physical principle. What's more, Einstein's way of looking at it all was the one that turned out to match reality the best.

      For example, in 1905 Poincare introduced "Poincare stresses", another fictitious set of forces, to reconcile the math they didn't like from what they thought of as reality.

      Lorentz and Poincare used the now-disproven aether as the basis for their theories. Einstein did not.

      Spend a…

    • JachJan 2012

      Hey, you finally made the leap to HN! Did you independently discover a lot of these things yourself or did you come across parts in books/papers? For me the canonical example of deriving magic numbers is with the fast inverse square root trick (my favorite paper on it is http://www.lomont.org/Math/Papers/2003/InvSqrt.pdf ) but I haven't seen many other instances... I haven't gone nearly far enough yet but I like getting pointed suggestions.

      There were some recent submissions here about related topics like space-filling curves and secret sharing that I've looked at before. When I started looking into abstract algebra and came across finite fields I sort of laughed at the Wikipedia page mentioning right at the beginning "Finite fields are important in number theory, algebraic geometry, Galois theory, cryptography, coding theory and Quantum error correction" with each topic being linked. It's a fun way to procrastinate.

      If your engine isn't part of some secret sauce I think it would be neat to study it. Unless you know of an already existing open source equivalent that's not hidden away in the corners of something like GCC?

    • koz1000Jan 2017

      Want to know the best part? Nearly all of those signature sounds were generated algorithmically by the processor on the sound board.

      The main program would feed some values into a series of feedback loops and shifts to generate the waves before pushing them out the DAC. Game programmers would just play around with various vectors until they found something that sounded interesting.

      The whole shebang ran in 2KiB of ROM firmware and 128 bytes of RAM. At 894 kilohertz.

      This dude reverse engineered the 6802 code and translated it to C#. Pretty amazing:

      http://www.lomont.org/Software/Misc/Robotron/

      Next time on our show we'll talk about the magic of palette cycling. Jarvis still uses this on his games to this very day. Kind of his signature now, right?

    • lvoudourAug 2017

      I first saw the code in the early 2000's and although I figured out the newton-rapshon part I couldn't wrap my head around the magic number, until I read chris Lomont's famous paper[1]. A little gem which reminds us that not that long ago computing resources were a limited commodity.

      Abundance is great and speeds up development time, but unfortunately it leads to laziness and bloat

      [1] http://www.lomont.org/Math/Papers/2003/InvSqrt.pdf

    • achilleOct 2011

      Also see:
      http://en.wikipedia.org/wiki/Fast_inverse_square_root

      And for more analysis and improvements see those papers:

      http://www.lomont.org/Math/Papers/2003/InvSqrt.pdf

      http://www.daxia.com/bibis/upload/406Fast_Inverse_Square_Root.pdf

      http://www.geometrictools.com/Documentation/FastInverseSqrt.pdf

    • mlnhdJun 2023

      Here is a nice white paper about a previous Excel 2007 bug, where a calculation that should result in 65535 is displayed as 100,000. The author concludes that since the patch only alters a few lines of assembly, that it was hand-coded.

      http://lomont.org/papers/2007/excel-2007-bug/Excel2007Bug.pdf

    Related

    mathbabemathbabe.org103 people

    Nate Silver confuses cause and effect, ends up defending corruption

    mathbabe
    Personal · last shared 2026
    MathWorks Blogsblogs.mathworks.com52 people

    Artificial Neural Networks for Beginners

    MathWorks Blogs
    Company · last shared 2026
    Gödel's Lost Letterrjlipton.wordpress.com185 people

    Mihai Pătraşcu 1982–2012

    Gödel's Lost Letter
    Personal · last shared 2021
    Random ASCIIrandomascii.wordpress.com274 people

    There are only four billion floats, so test them all (2014)

    Random ASCII
    Personal · last shared 2026
    Penzbapenzba.co.uk26 people

    High-dimensional spheres are "spikey"

    Penzba
    Personal · last shared 2025
    Matt Taylormjt.me.uk70 people

    The smallest 256x256 single-color PNG file, and where you've seen it (2015)

    Matt Taylor
    Personal · last shared 2026
    Simon Tathamchiark.greenend.org.uk/~sgtatham363 people

    Simon Tatham's Portable Puzzle Collection

    Simon Tatham
    Personal · last shared 2026
    Jeremy Kunjeremykun.com194 people

    A Programmer's Introduction to Mathematics

    Jeremy Kun
    Personal · last shared 2026