News for hackers. Stuff that matters.
Re:Most “mandatory requirements” in corporations are imaginary by AnIdiotOnTheNet on Wednesday August 19, 2020 @10:07AM (#24210480)
Mathematically speaking though, infinity is not the correct answer to x/0 anyway. It's just a usefully incorrect result in a lot of situations.
Re:Most “mandatory requirements” in corporations are imaginary by renewiltord on Wednesday August 19, 2020 @02:48PM (#24214451)
That's true for a lot of IEEE-754. 1/0 is defined in it in a useful way. Just as 1/3 is defined in a useful way that is not equivalent to its mathematical property.
Re:Most “mandatory requirements” in corporations are imaginary by rcoveson on Wednesday August 19, 2020 @03:01PM (#24214659)
It's not the correct answer for division of the reals. For division of IEEE 754 floats, it is the correct answer, because division in that context is defined that way.
Re:Most “mandatory requirements” in corporations are imaginary by colejohnson66 on Wednesday August 19, 2020 @10:39AM (#24210820)
Well, it’s incorrect when dividing by 0, yes. But when you do the limit as the bottom factor approaches 0, it makes sense.

So, below, the first one is defined, while the second one isn’t.

    lim_{x->0+} 1/x == +Infinity
    1/0 != (anything)
Re:Most “mandatory requirements” in corporations are imaginary by corty on Wednesday August 19, 2020 @11:24AM (#24211320)
Yes, but thats only a small part of the story, your limit only works if the numerator is constant, positive and > 0. Actually, the correct answer for lim{x->0} a/x is really "anything" and "strongly depends on a and da/dx"...

So in general, assuming anything like \infty for a division by zero is wrong wrong wrong.

Re:Most “mandatory requirements” in corporations are imaginary by colejohnson66 on Friday August 21, 2020 @09:52AM (#24234872)
Sorry if I wasn’t clear. I was not implying that any a/b where b approaches 0 is always +infinity. I was simply saying that a/0 isn’t defined, but that in the case of 1/x (positive 0), it is somewhat defined as positive infinity.
Re:Most “mandatory requirements” in corporations are imaginary by BeetleB on Wednesday August 19, 2020 @01:25PM (#24213091)
IEEE 754 handles all the cases you mentioned - it doesn't always prescribe Inf.
Re:Most “mandatory requirements” in corporations are imaginary by nybble41 on Wednesday August 19, 2020 @12:14PM (#24212071)
That depends on the numerator:

     lim_{x->1+} (x^2-1)/(x-1) == 2
Of course ideally evaluating this particular formula for x == 0 would give 0/0 which IEEE FP defines as NaN, but you could also get a non-zero finite number divided by zero due to rounding for x ≅ 1 and then the default result of +Infinity would be very far from the correct answer. Any situation where you might come close to a 0/0 or ∞/∞ term requires very careful consideration since there is very little separation between a NaN result and ±Infinity.