From: Mark Hubbart Date: 2004-05-06T04:28:36+09:00 Subject: Re: 0.0 sign On May 5, 2004, at 10:33 AM, Elias Athanasopoulos wrote: > Hello! > > I don't know if this is intentional, but is there a reason > that 0.0 holds the sign? IEEE 754 (floating point arithmetic standard) specifies negative zero for floats. For more explanation, see http://www.obtuse.com/resources/negative_zero.html if a mathematical result too small for your hardware to compute is returned, you can determine whether it was on the negative side, or the positive side. def really_complex_function(num) num/1_000_000_000_000_000_000.0 end ==>nil really_complex_function( 0.000_000_000_000_000_000_1 ) ==>0.0 really_complex_function( -0.000_000_000_000_000_000_1 ) ==>-0.0