News for hackers. Stuff that matters.
Re:1/0 = 0 by Jach on Friday August 10, 2018 @06:58PM (#17737300)
JS just assumes the limit direction for you, so 1/0 is Infinity, but -1/0 is -Infinity. 0/0 at least is correctly NaN. (Edit: And I just verified against my memory, Matlab (or at least Octave) does the same thing. While Matlab might get characterized as being for the ivory tower, at least it's had a long history of being used for practical math applications within the tower. Edit2: And anyway this is the defined behavior for IEEE floats. Men of industry use industrial standards. :))
Re:1/0 = 0 by lightgreen on Saturday August 11, 2018 @01:01AM (#17738431)
Moreover, 1/-0 is -Infinity. IEEE float has two zeros, positive and negative.