Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nope, I'd disagree. Zero isn't an approximation of some epsilon, it's really just zero. It makes sense for the output sign to match the input sign.


What is the sign of 0?

It's 0.


Parent was talking about the sign of the numerator. But... zero in IEEE 754 representation has a meaningful sign bit. 1/-0 = -inf.


Or as IEEE 754 sees it (you can try this in your JavaScript REPL).

  >> 1 / 0
  Infinity
  >> 1 / -0
  -Infinity




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: