HyperQuark / hyperquark

compile scratch projects to webassembly
https://hyperquark.github.io/hyperquark/
Apache License 2.0
9 stars 0 forks source link

NaNs should be treated as 0 in mathematical operations #17

Open pufferfish101007 opened 1 month ago

pufferfish101007 commented 1 month ago

wherever scratch uses Cast.toNumber, NaNs are converted to 0 to avoid NaN propagation. Hyperquark should adhere to this too. e.g. ((1 / 0) - (1 / 0)) + 11) should equal 11, not NaN.