Closed
Description
Bug description
Calling toString
on an f64
value works as expected, but doing the same on an f32
string introduces extra noise decimals. I suspect it is because the f32
value is being cast to f64
when passed into the dtoa
function:
assemblyscript/std/assembly/number.ts
Lines 317 to 319 in f79391c
assemblyscript/std/assembly/util/number.ts
Line 734 in f79391c
Steps to reproduce
console.log((<f64>1.1).toString()); // "1.1"
console.log((<f32>1.1).toString()); // "1.100000023841858"
AssemblyScript version
v0.27.29