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
This happens because ( 1 / 0 ) = Infinity and ( -0 + -0) = -0. If you double click the ( -0 + -0) block in Scratch it will report 0, but internally it is still -0, it looks like 0 because (-0).toString() is 0. ( Infinity / -0 ) = -Infinity, so Scratch handles the block correctly.
TurboWarp on the other hand turns the -0 into a 0 leaving ( Infinity / 0 ) = Infinity. This happens because TurboWarp tries to deal with the potential NaN using || 0. This operation inadvertently also converts -0 into 0, as (-0) || 0 === 0.
The text was updated successfully, but these errors were encountered:
A simple example is ( ( 1 / 0 ) / ( -0 + -0 ) ) which returns -Infinity in TurboWarp but Infinity in Scratch
See demo project 773175910 on Scratch and TurboWarp.
This happens because ( 1 / 0 ) = Infinity and ( -0 + -0) = -0. If you double click the ( -0 + -0) block in Scratch it will report 0, but internally it is still -0, it looks like 0 because
(-0).toString()
is 0. ( Infinity / -0 ) = -Infinity, so Scratch handles the block correctly.TurboWarp on the other hand turns the -0 into a 0 leaving ( Infinity / 0 ) = Infinity. This happens because TurboWarp tries to deal with the potential NaN using
|| 0
. This operation inadvertently also converts -0 into 0, as(-0) || 0 === 0
.The text was updated successfully, but these errors were encountered: