Post AcKd8LtfJhmktmzuMK by simontatham@hachyderm.io
(DIR) More posts by simontatham@hachyderm.io
(DIR) Post #AcKd8LtfJhmktmzuMK by simontatham@hachyderm.io
2023-11-30T09:28:55Z
1 likes, 0 repeats
Very confused just now to print the number 0.1999999 using the printf %a format (hex floating point) and get something like 0x1.999999p-3. My first thought was that somehow it was accidentally still printing in decimal! But no, those two numbers really are equal (in the limit as you add more nines), by a silly coincidence.That's almost as confusing as the time I accidentally printed a baud rate in hex and didn't notice, because 38400 == 0x9600, so it still looked plausible.