Also, the value may actually be pretty much ok, but Espruino is just not converting it to a string in exactly the same way as you wrote it. For example 1180.952381 and 1180.95238100000 are basically the same number, just with some extra 0 on the end.
Another option you have is if you always have 6 decimal places, just store the value as an integer in a Int32Array (parseInt("1180.952381".replace(".","")) and then divide by 1000000 in whatever maths you do.
© Espruino, powered by microcosm.
Report a problem