You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Perhaps not the cast itself, but rather dtoa is designed for 64-bit precision input value. If there were a 32-bit version of dtoa and its dependent functions, then it should be possible to emit "1.1" for an f32.
Bug description
Calling
toString
on anf64
value works as expected, but doing the same on anf32
string introduces extra noise decimals. I suspect it is because thef32
value is being cast tof64
when passed into thedtoa
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
AssemblyScript version
v0.27.29
The text was updated successfully, but these errors were encountered: