Description
Arithmetic operations on a float32 may produce numbers that are only representable as float64.
Repro code
This prints
but 2.7 is not a number that is representable as float32. On .NET, the same code prints
Doing Math.fround(2.7) in the console returns 2.700000047683716, which corresponds to the .NET float32. Shouldn't all float32 operations, not just literals, be wrapped in an fround?
Related information
- Fable version: 3.4.10 in the REPL
Description
Arithmetic operations on a float32 may produce numbers that are only representable as float64.
Repro code
This prints
but 2.7 is not a number that is representable as float32. On .NET, the same code prints
Doing
Math.fround(2.7)in the console returns2.700000047683716, which corresponds to the .NET float32. Shouldn't all float32 operations, not just literals, be wrapped in anfround?Related information