From: Jamis Buck Date: 2004-10-28T03:48:56+09:00 Subject: Re: Rounding error, (100.0 * 9.95).to_i == 994 Bill Atkins wrote: > OK, that would make sense if v's value was 994.5, but it seems to be > 995.0. Why should to_i round down like that? But it isn't 995.0. It is 994.99999999883 or something. IRB displays it as 995.0, rounding it. - Jamis > > Bill > > On Thu, 28 Oct 2004 03:27:33 +0900, Walter Szewelanczyk > wrote: > >>you may want to try >> >> >ri Float#round > > > . > -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis