Y
Hacker News
new
|
ask
|
show
|
jobs
by
the5avage
599 days ago
"a == b" is the same as "not (a != b)"
Maybe I'm simple minded though.
2 comments
int_19h
598 days ago
If you treat each "!" as a NOT, then (a != b != c) has two NOTs, but !(a == b == c) has a single one, so this is a bit like expecting that !(a && b) is the same as (!a && !b).
link
Doxin
598 days ago
"a == b == c" translates to "a == b and b == c", similarly "a != b !=c" translates to "a != b and b != c"
link