Comment on NaNs Just Don't Get No RespectparentComments−malkia14yIn some languages, a, b would be +Infinity. On top of my head I can't remember whether +Infity != +Infinity (have to write a test and see). For NaN's definitely.−tikhonj14yOne of those languages is JavaScript, so--assuming your browser supports JavaScript--you do have somewhere to test it :P.The answer is that 5 / 0 is Infinity and (5 / 0) == (5 / 0), so it's all good :). Now, 0 / 0 is NaN and (0 / 0) != (0 / 0).
Comments
In some languages, a, b would be +Infinity. On top of my head I can't remember whether +Infity != +Infinity (have to write a test and see). For NaN's definitely.
One of those languages is JavaScript, so--assuming your browser supports JavaScript--you do have somewhere to test it :P.
The answer is that 5 / 0 is Infinity and (5 / 0) == (5 / 0), so it's all good :). Now, 0 / 0 is NaN and (0 / 0) != (0 / 0).