Carpet

Carpet

2M Downloads

Scarpet 0/0 equality

rv3r opened this issue ยท 3 comments

commented
0/0 -> NaN
0/0 == 1 -> true
0/0 == -1 -> true
0/0 == 2 -> true
...
3/0 -> INFINITY
0/0 == 3/0 -> true

Bug or WAI?

commented

walk around:
you can create an function is_nan(x) by yourself.
if type(x) is number and str(x) is NaN

commented

NaN equality has an issue (#1576), and PR to fix (#1577).

The Infinity one is actually the same, 0/0 => NaN == anything.

commented

Yes, this is a duplicate of #1576 I think.