Re:Testing for -0 (negative zero) in JavaScript
by sp332 on Wednesday February 16, 2011 @08:38PM
(#2229268)
Negative 0 means that you have a negative value, but the value is too small to be represented with available precision. It's a way of noting the sign of the value even if the magnitude is unavailable. It could be useful if you're testing edge cases, or if you're looking for signs of an infinity (or negative infinity) in your program.
[ Parent
| on HN ]
There are no comments on this comment yet.