Troupe
Troupe copied to clipboard
Division by zero results in 'Infinity' or 'NaN' value
I'm not sure whether this is the intended semantics (side effect of using javascript?), but dividing a non-zero number by zero results in (+/-) Infinity
1/0
gives
>>> Main thread finished with value: Infinity@{}%{}
Similarly, dividing zero by zero results in a NaN value:
0/0
gives
>>> Main thread finished with value: NaN@{}%{}
The Infinity / NaN are also propagated when they are used in arithmetic operations with other values.
Thanks. This is a bug. We should insert zero checks for division in the IR2Raw.
Fixed in 0a823d3c0d8698cbdf4aaa036fafaca2115a2c1c