Thomas B. wrote:
> Hello.
> 
> I have a simple question - how to detect if a variable contains a Float
> of value -0.0? Is there any special method for this, or any comparison
> that distinguishes negative zero from a the regular zero?
> 
> Thanks in advance.
> TPR.

irb(main):001:0> x = -0.0
=> -0.0
irb(main):002:0> x == 0.0
=> true
irb(main):003:0> x.eql?(0.0)
=> true
irb(main):004:0> x.equal?(0.0)
=> false

-- 
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407