Skip to content

Instantly share code, notes, and snippets.

@dnasca
Created August 20, 2015 23:02
Show Gist options
  • Select an option

  • Save dnasca/e9d666bea1abc837dfb2 to your computer and use it in GitHub Desktop.

Select an option

Save dnasca/e9d666bea1abc837dfb2 to your computer and use it in GitHub Desktop.
Testing for negative zero.
function isNegativeZero(x) {
return x === 0 && (1/x < 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment