• Float64Array uses exactly the same number format as JavaScript uses internally, so you'll find that there is no loss between just parseFloat(s) or putting the value in an array. It's just the way computers work.

    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.


Avatar for Gordon @Gordon started