News for hackers. Stuff that matters.
Re:Negative Base by bzbarsky on Friday June 29, 2018 @01:26AM (#17422593)
I'd think that in all those languages, -0 == +0 tests true, though. In JavaScript even -0 === +0 tests true.

The only way to tell them apart in general is to divide by them. In some languages you might be able to type-pun and examine the bit pattern, or do things like Object.is() or whatnot.

There are no comments on this comment yet.