gnembon / fabric-carpet

Fabric Carpet
MIT License
1.65k stars 261 forks source link

Scarpet 0/0 equality #1776

Closed rv3r closed 11 months ago

rv3r commented 11 months ago
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?

silnarm commented 11 months ago

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

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

altrisi commented 11 months ago

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

ch-yx commented 11 months ago

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