DEV Community

loading...

Discussion on: Identifying Negative Zero

Collapse
emnudge profile image
EmNudge Author

I did some testing and unfortunately could not get them to produce different results with bitwise operators.

I have been looking at the spec for how it decides what to do and it seems that unless explicitly stated otherwise, -0 and 0 are treated the same.

Collapse
rubberduck profile image
Christopher McClellan

That’s unfortunate.