On Tue, Apr 14, 2009 at 14:28, Gary Wright <gwtmp01 / mac.com> 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) <shot / hot.pl> 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