From: Gary Wright Date: 2008-01-09T06:17:55+09:00 Subject: Re: Precision of Float On Jan 8, 2008, at 3:50 PM, Kornelius Kalnbach wrote: > Gary Wright write: >> You're getting confused because Float#to_s rounds. > ...while to_i and to_int are just chopping off the integer part, > like #floor, I guess? > > irb(main):020:0> "%0.15f" % (8.2 * 100) > => "819.999999999999886" > > floats are weird things. I think a lot of the mystery comes from the implicit base2/base10 conversions that most programmers don't take into consideration. Gary Wright