@eniko once upon a time I expressed astonishment to a mathematician friend that IEEE floating point math produced an inf for (nonzero)/0 because back in college I remembered a math professor being very adamant than dividing a number by zero doesn't magically give you infinity.
My mathematician friend replied, cool as cucumber soup, "really it depends on how you define division".
So there you go! All things are arbitrary! You are free now from the shackles of mathematic pedantry!
@eniko Also 0 * inf = NaN is definitely IEEE's fault. NaN should have never been made a number.
@tacitus both expressions evaluate false under the floating point rules I'm familiar with. Any arithmetic op w/ a NaN as an operand always produces a NaN, and == with one or both operands as NaNs always returns false.
@aeva @eniko x87 used to have two modes - affine and projective. In projective mode, there was only one zero (yay!) but that also means there's only one infinity, i.e. 1/0 and -1/0 both gave the same infinity - it's the infinity where parallel lines meet, which of course lives at "both ends" of the number line.
Sadly this mode was retired a while ago, and now it's stuck in affine mode, so you get two infinities, and irritatingly, two zeros to match. Boo.