DEV Community

loading...

Discussion on: Daily Challenge #312 - Describe the Function

Collapse
bugb profile image
bugb

You are correct, I mean:

±n / 0 == ±∞
0 * 0 == 0 + 0 == 0 - 0
Enter fullscreen mode Exit fullscreen mode
Thread Thread
qm3ster profile image
Mihail Malo

If we're talking IEEE754-like floats, there's also NaN :v

  • NaN + a == NaN - b == NaN * c == NaN / d == NaN % e == f + NaN == g - NaN == h * NaN == i / NaN == j % NaN (== NaN)
  • inf + a == inf - b == inf * c == inf / d == f + inf == h * inf (== inf)
  • -inf + a == -inf - b == -inf * c == -inf / d == f + -inf == h * -inf (== -inf)
  • inf - inf == inf / inf (== NaN)