in reply to Determining whether a value is zero.

And what about -0.0 ;which, at least on my linux box, is a valid value in Perl? --Ray
  • Comment on Re: Determining whether a value is zero.

Replies are listed 'Best First'.
Re^2: Determining whether a value is zero.
by Argel (Prior) on Mar 11, 2011 at 01:26 UTC
    FYI, the IEEE floating point standard requires support for positive and negative zero. See Signed_Zero and IEEE_754 for more. So more like a "most computers and programming languages" thing than a Perl thing.

    Elda Taluta; Sarks Sark; Ark Arks

Re^2: Determining whether a value is zero.
by JavaFan (Canon) on Mar 10, 2011 at 13:50 UTC
    I'll accept either way, under the condition it's consistent with what you'd return on dualvar(-0.0, ...)