TurboWarp / scratch-vm

Scratch VM with a JIT compiler and more features
https://turbowarp.org/
Mozilla Public License 2.0
75 stars 72 forks source link

Trig functions not marked NaN-able even though they return NaN at Infinity or -Infinity #102

Closed Tacodiva closed 1 year ago

Tacodiva commented 1 year ago

This block:

image

returns NaN in TurboWarp but 0 in Scratch, because sin, cos and tan return can NaN when their input is Infinity or -Infinity, but are not marked as able to be NaN.

See demo project 773375319 on Scratch and TurboWarp.