From: Daniel Luz Date: 2009-04-17T04:57:35+09:00 Subject: [ruby-core:23222] Re: [Bug #1336] Change in string representation of Floats On Tue, Apr 14, 2009 at 14:28, Gary Wright wrote: > What about literal values for NaN, Infinity, -Infinity? I don't see a reason for literals, though every now and then I've wondered about constants for infinite values. > (...) There doesn't seem to > be a way to query a float to distinguish between -Infinity and Infinity Other than comparing each other or testing against zero, you mean? > or > between -0.0 and 0.0 other than via #to_s. Good point. Maybe we could have "#negative?"? On Thu, Apr 16, 2009 at 13:29, Shot (Piotr Szotkowski) wrote: > -0.0.equal? 0.0 # => false Though this is because floats are (currently) neither immediate nor reused from a pool. For that matter: 0.0.equal? 0.0 # => false -- Daniel