News for hackers. Stuff that matters.
Re:1/0 = 0 (2018) by eqvinox on Sunday December 01, 2024 @11:01PM (#42292988)
In IEEE 754 math, x/0 for x < 0 is in fact negative infinity.

  >>> np.float64(-1.)/0.
  -inf
  >>> np.float64(1.)/0.
  inf
And you're exactly right, 0/0 is NaN in 754 math exactly because it approaches negative infinity, zero (from 0/x), and positive infinity at the same time.

There are no comments on this comment yet.