From: Yusuke ENDOH Date: 2010-04-08T20:29:49+09:00 Subject: [ruby-core:29319] Re: [Feature #2152] Split functionality of Float#inspect and Float#to_s Hi, 2010/4/8 Benoit Daloze : > So, double have a range (between two of them) of 2e-52 ~ 10e-16. Should we then round at > 15~16 digits ? There is no silver bullet against floating point error :-) "%.15f" % (1.9 + 0.7 - 0.2) #=> "2.399999999999999" -- Yusuke ENDOH