ceylon / ceylon-js

DEPRECATED
Apache License 2.0
54 stars 9 forks source link

divide by undefined is zero #674

Closed jvasileff closed 8 years ago

jvasileff commented 8 years ago
print(-0.0 / (0.0/0.0));

prints -0.0 but should print NaN.

chochos commented 8 years ago

print NaN, or throw?

jvasileff commented 8 years ago

This claims NaN for ±0/±0.

chochos commented 8 years ago

on both backends?

jvasileff commented 8 years ago

This is already the way it works on the Java backend, and also the JavaScript backend for positive zero.

jvasileff commented 8 years ago

Oops, I thought we were commenting on the other issue (divide by 0). Here's a better link: https://en.wikipedia.org/wiki/NaN#Operations_generating_NaN

chochos commented 8 years ago

well both issues are closely related