Dan Zwell wrote: > To compare floats, you must ask whether they are within a certain > threshold of each other. > Epsilon = 0.00000000001 > return (num1-num2).abs < Epsilon # num1 == num2 > > Dan > > Oops, I didn't realize that Ruby comes with an Epsilon. This should be a fine test for equality: return (num1-num2).abs < Float::EPSILON Now, whether Float#==(other) should make this check might be worth thinking about, but I really have no opinion on the matter--I'm used to not comparing floats like this. Dan