in reply to Re^4: Negative zero from a multiplication by a zero?
in thread Negative zero from a multiplication by a zero?

Somebody should just fix the bad floating point implementation / standard. Having -1.2 * 0 be -0 rather seriously misses the point of "negative zero" and brings it into play in places where it has no business and is just a royal pain with no benefit.

If you want to detect the sign of your underflow, you should bother to check before multiplying by a negative value or you should get a floating point implementation that distinguishes "zero" from "positive zero" (but most floating point implementations don't do that because "negative zero" was partly motivated by having a spare bit handy and there isn't as handy of a bit to make "positive zero" out of).

Surely we need "negative NaN" as much as "negative zero". We must distinguish +Inf * 0 from +Inf * -0, surely. At least, it makes just as much sense as having "negative zero" for one underflow case (but not having a special value for "positive underflow", much less another for "underflow of indeterminate sign").

- tye        

  • Comment on Re^5: Negative zero from a multiplication by a zero? (negative)

Replies are listed 'Best First'.
Re^6: Negative zero from a multiplication by a zero? (negative)
by syphilis (Archbishop) on Jun 13, 2009 at 07:31 UTC
    Surely we need "negative NaN" as much as "negative zero".

    Sssshhh ... you'll give 'em ideas.
    The standard that I find really absurd is NaN ** 0 being defined as 1. The logic seems to be that since *all* numbers raised to the power 0 are 1, then NaN ** 0 should also be 1. (Those who create these standards are apparently unaware of the fact that a NaN is not a number.)

    Cheers,
    Rob