From: Roger Pack Date: 2010-05-11T01:59:15+09:00 Subject: [ruby-core:30133] Re: [Feature #2152] Split functionality of Float#inspect and Float#to_s > I think a good idea would to allow that optional parameter that would > basically act as: > def to_s(n = DEFAULT_PRECISION) > �"%.#{n}f" % float > end > and the default value be according to have a similar result to 1.8. I recently discovered Float#round the other day, if that's of any use. > 1.1-0.9 => 0.20000000000000007 >> (1.1-0.9).round(2) => 0.2