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 · #2051

E

Exploring Binary

Personal blog · exploringbinary.comprogrammingmath

Exploring Binary is a personal blog at exploringbinary.com about programming and math. Since 2009, 35 different Hacker News readers have linked it 84 times, most often “PHP 5.3.3 hangs on numeric value 2.2250738585072011e-308”. The last post was in 2024, but the archive is still widely read.

Visit the blog
84mentions?
35HN people?
2009–2026first – last linked?
Links on Hacker News per year · peak 16 in 2011

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

Why HN links it

HN readers link Exploring Binary for detailed, illustrated explanations of floating-point and binary number conversion, and for write-ups of bugs in strtod, Java and PHP number conversion.

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

``There are 10 types of people in the world — those who understand binary and those who don’t.\'\' Read these articles and become one of those who do!

Most-linked posts?

  1. PHP 5.3.3 hangs on numeric value 2.2250738585072011e-308
    3 people · 4 mentions · first linked 2011-01-04
  2. /java-hangs-when-converting-2-2250738585072012e-308/
    3 people · 3 mentions · first linked 2020-05-26
  3. Ten Ways to Check if an Integer Is a Power Of Two in C
    2 people · 2 mentions · first linked 2011-07-26
  4. How strtod() Works (and Sometimes Doesn’t)
    2 people · 2 mentions · first linked 2012-10-20
  5. How I Taught Third Graders Binary Numbers
    2 people · 2 mentions · first linked 2011-06-14
  6. Why 0.1 Does Not Exist in Floating-Point – Exploring Binary
    2 people · 2 mentions · first linked 2022-10-16
  7. Why 0.1 Does Not Exist In Floating-Point
    2 people · 2 mentions · first linked 2012-09-07
  8. A Closer Look at the Java 2.2250738585072012e-308 Bug
    2 people · 2 mentions · first linked 2011-02-08
  9. /why-volatile-fixes-the-2-2250738585072011e-308-bug/
    2 people · 2 mentions · first linked 2013-01-27

What Hacker News says?

  1. As the parent already said, the nice thing about hexadecimal floating-point is that the standard MANDATES that you get exactly the float/double you have uniquely described. The assertion “you can uniquely identify all floats by printing them with printf("%1.8e")” on the other hand relies on the compiler using round-to-nearest for conversions between binary and decimal, which the standard does not mandate and which,…

    Comment linking /tag/bug/

    on “Some Obscure C Features”
  2. Submitted Java Hangs When Converting 2.2250738585072012e-308 as a story · 180 points

    HN discussion
  3. MrQuincle · 2016-10-30Recommends
    This is a nice example of how much work goes into a good implementation: http://www.exploringbinary.com/how-strtod-works-and-sometime...

    Comment linking /how-strtod-works-and-sometimes-doesnt/

    on “How I Became HackerRank 1 in Two Hours”
  4. Submitted PHP 5.3.3 hangs on numeric value 2.2250738585072011e-308 as a story · 179 points

    HN discussion
  5. Java had a variant of that bug too: https://www.exploringbinary.com/java-hangs-when-converting-2... It sits in a loop flip-flopping between 2 representations, each time deciding the other one is better. This turned into a DOS, as some web servers used floating point when decoding time zones from the http request header. So if your server has e.g. 20 http acceptor threads, someone could send 20 requests with an insan…

    Comment linking /java-hangs-when-converting-2-2250738585072012e-308/

    on “I/O library 6x faster than fmt, 10x faster than stdio.h and iostream”
  6. Submitted Ten Ways to Check if an Integer Is a Power Of Two in C as a story · 114 points

    HN discussion
  7. > Another biggie is floating point. Converting binary floating point to decimal floating point and vice versa is VERY VERY VERY SLOW, difficult to get right Never forget the cluster bug in PHP because the developers decided they needed to reinvent the wheel[1]. [1] https://www.exploringbinary.com/php-hangs-on-numeric-value-2...

    Comment linking /php-hangs-on-numeric-value-2-2250738585072011e-308/

    on “I/O library 6x faster than fmt, 10x faster than stdio.h and iostream”
  8. Submitted How I Taught Third Graders Binary Numbers as a story · 95 points

    HN discussion
  9. Urgh. C semantics. Well, at least that will not happen if you actually use IEEE754 _and_ if a, b, and c all have the same floating point precision _and_ there is no weird promotion/precision change going on. Now that you mention, there was this fascinating denial-of-service vulnerability in PHP which is (kind of) related... https://news.ycombinator.com/item?id=2066352 http://www.exploringbinary.com/why-volatile-fixe…

    Comment linking /why-volatile-fixes-the-2-2250738585072011e-308-bug/

    on “Type-safe GraphQL with OCaml”
  10. Submitted 7 Bits Are Not Enough for 2-Digit Accuracy as a story · 70 points

    HN discussion
  11. userbinator · 2019-02-06Recommends
    One of my favourite sites for explaining floating-point, especially the more subtle aspects, is https://www.exploringbinary.com/ . Here's a similar article from that site: https://www.exploringbinary.com/the-spacing-of-binary-floati...

    Comment linking /the-spacing-of-binary-floating-point-numbers/

    on “Floating Point Visually Explained (2017)”
  12. Submitted Why 0.1 Does Not Exist In Floating-Point as a story · 60 points

    HN discussion
  13. > Many people think floating point numbers are magically precise. Even worse, it kicks in earlier than one might naively think. People are often surprised to hear a value as simple as 0.1 has no matching floating point representation. (For those interested, http://www.exploringbinary.com/why-0-point-1-does-not-exist-... has a nicely illustrated explanation.)

    Comment linking /why-0-point-1-does-not-exist-in-floating-point/

    on “How many floating-point numbers are in the interval [0,1]?”
  14. Submitted A Closer Look at the Java 2.2250738585072012e-308 Bug as a story · 58 points

    HN discussion
  15. Too late, we've already sent self-addressed envelopes out into the Cosmos. http://www.exploringbinary.com/binary-code-on-the-pioneer-10...

    Comment linking /binary-code-on-the-pioneer-10-spacecraft/

    on “The International Flag of Planet Earth”
  16. Submitted The Spacing of Binary Floating-Point Numbers as a story · 41 points

    HN discussion
  17. Probably https://www.exploringbinary.com/java-hangs-when-converting-2... : “Java — both its runtime and compiler — go into an infinite loop when converting the decimal number 2.2250738585072012e-308 to double-precision binary floating-point. This number is supposed to convert to 0x1p-1022, which is DBL_MIN; instead, Java gets stuck, oscillating between 0x1p-1022 and 0x0.fffffffffffffp-1022, the largest subnormal dou…

    Comment linking /java-hangs-when-converting-2-2250738585072012e-308/

    on “How does your programming language handle “minus zero” (-0.0)?”
  18. Submitted Visual C++ strtod(): Still Broken as a story · 38 points

    HN discussion
  19. Reminds me about that fairly recent strtod() infinite loop that caused DoS in several languages. http://www.exploringbinary.com/why-volatile-fixes-the-2-2250...

    Comment linking /why-volatile-fixes-the-2-2250738585072011e-308-bug/

    on “IDIV DoS (INT_MIN / -1)”
  20. Submitted Correct Decimal To Floating-Point Using Big Integers as a story · 18 points

    HN discussion
  21. A surprising fact I just learned about float parsing is that it is absolutely trivial (and, I expect, very fast) if you are willing to tolerate a 1 ULP inaccuracy: https://www.exploringbinary.com/quick-and-dirty-decimal-to-f... (Though 1/100M randomly tested conversions had a 14ULP inaccuracy, so I guess the inaccuracy is a bit unpredictable).

    Comment linking /quick-and-dirty-decimal-to-floating-point-conversion/

    on “FastDoubleParser: Java port of Daniel Lemires fast_double_parser”
  22. Submitted Properties of the Correction Loop in David Gay’s strtod() as a story · 15 points

    HN discussion
  23. Maybe overly pedantic, but I don't like http://www.exploringbinary.com/wp-content/uploads/27.decimal... For the tens you're counting lines of blocks, and for the ones you're counting blocks, so it doesn't match up. Maybe if the ones were lined horizontally so you're still counting vertical lines, they just happen to be 1 block tall instead of 10 blocks tall.

    Comment linking /wp-content/uploads/27.decimal.png

    on “How I Taught Third Graders Binary Numbers”
  24. Submitted Binary Division as a story · 7 points

    HN discussion
  25. As someone who has done lots of work with floating point, I disagree. My fear (or more properly caution) with floating point includes tricks like if you are going to add up an array of floating point numbers, you need to sort them first. The experienced floating-point programmer will know what order you need to do this in. The inability to represent 0.1 properly in binary floating point is not a problem solved by in…

    Comment linking /php-hangs-on-numeric-value-2-2250738585072011e-308/

    on “The Misfortunes of a Trio of Mathematicians Using Computer Algebra Systems [pdf]”
  26. Submitted Ten Ways to Check If an Integer Is a Power of Two in C (2009) as a story · 6 points

    HN discussion
  27. Given the name I thought the site would have a GUI for playing around with floating-point numbers, like this one: https://www.exploringbinary.com/floating-point-converter/ The "On Using Integers" page seems very narrowly applicable because it only discusses fixed-point in the context of currency; in a lot of other applications, notably DSP and other multimedia, fixed-point is the norm.

    Comment linking /floating-point-converter/

    on “The Floating-Point Guide (2010)”
  28. Submitted Decimal Precision of Binary Floating-Point Numbers as a story · 4 points

    HN discussion
  29. I think your provocative comment belies a challenging truth: federated trust. I can be a rational person and in my rationality delegate the conclusions on climate questions to those who are funded to spend their time, with my trust essentially delegating to the peer reviewed journals and journalists describing their work. We don’t however need science or such federated rationality to tell us what 2+2 is, rather why…

    Comment linking /floating-point-questions-are-endless-on-stackoverflow-com/

    on ““Assault on Reason” Endangers Democracy (2008)”
  30. Submitted Number of Digits Required for Round-Trip Conversions as a story · 3 points

    HN discussion

Search all of HN for exploringbinary.com

Linked by the same people?