|Don't ask to ask, just ask|
Re^4: int() functionby LanX (Cardinal)
|on Oct 25, 2020 at 12:09 UTC||Need Help??|
> if the stringification provided an extra 2 decimal digits
How this? There are only 2-3 bits left and 2**3 < 10, so no way to get a 16th decimal out of a double.
I know it's confusing. But if you stuff a number with more than 15 decimals into a double you'll have loss anyway. And I doubt it's better in JS or python.
> "cmp_ok(0.14, '==', 1.4 / 10
Well, but on the other hand eq should work because of the magic.
IMHO most people understand rounding errors, the point of confusion is that exact decimal fractions are not always exact binarie floats.
Probably we should have a shortcut for something like printf "%.18f" to facilitate diagnosis.