by jrumbut · 6y ago · 0 comments
The existence of this problem is so obvious in hindsight and I was so completely unaware of it previously.
https://bugs.python.org/issue1580
After they did that, I learned that Scheme specifies similar behavior. In fact, I think it was added to R4RS after the Steele and White paper. As the article says, this behavior spread across languages, so that it's weird to see something different now.
If you want to nerd out on this, here are a few other posts that explore the topic:
https://www.exploringbinary.com/the-shortest-decimal-string-...
https://www.exploringbinary.com/the-shortest-decimal-string-...
https://www.exploringbinary.com/java-doesnt-print-the-shorte...