From https://en.wikipedia.org/wiki/Single-precision_floating-point_format "This gives from 6 to 9 significant decimal digits precision"
From https://en.wikipedia.org/wiki/Double-precision_floating-point_format "The 53-bit significand precision gives from 15 to 17 significant decimal digits"
you have 10 digits so won't fit into float32, as for float64 10 digits should fit but still not every value can be represented exactly, see e.g. https://stackoverflow.com/questions/12165216/which-values-cannot-be-represented-correctly-by-a-double
© Espruino, powered by microcosm.
Report a problem