DEV Community

loading...

Discussion on: Daily Challenge #312 - Describe the Function

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)