there's only
x + 0 == x - 0 (== x)
x * 1 == x / 1 (== x)
2 + 2 == 2 * 2
4 - 2 == 4 / 2 (reverse)
4 - 2 == 4 / 2
Right? What did you mean with
one of these numbers is 0
You are correct, I mean:
±n / 0 == ±∞ 0 * 0 == 0 + 0 == 0 - 0
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)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
there's only
x + 0 == x - 0 (== x)
x * 1 == x / 1 (== x)
2 + 2 == 2 * 2
4 - 2 == 4 / 2
(reverse)Right? What did you mean with
You are correct, I mean:
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)