From: LAMBEAU Bernard Date: 2010-04-07T20:02:00+09:00 Subject: Precision and == --0016e6da2e5195073b0483a37d40 Content-Type: text/plain; charset=ISO-8859-1 We all know that finite representation comes with some difficulties... but... x = 45.0*(Math::PI / 180.0) y = 0.785398163397448 puts "#{x.class} : #{x}" puts "#{y.class} : #{y}" puts 45.0*(Math::PI / 180.0) == 0.785398163397448 prints Float : 0.785398163397448 Float : 0.785398163397448 false Does to_s show something less precise than the internal representation of Floats? thx Bernard --0016e6da2e5195073b0483a37d40--