From: Robert McGovern Date: 2002-12-10T21:21:25+09:00 Subject: Re: warnings -w >>>>(2.4/0.2).to_i > > D> => 11 > > Float#to_i is the same than Float#truncate > > pigeon% ruby -e 'p ((2.4/0.2).truncate)' > 11 > pigeon% > > pigeon% ruby -e 'p ((2.4/0.2).floor)' > 11 > pigeon% > > pigeon% ruby -e 'p ((2.4/0.2).ceil)' > 12 > pigeon% > > pigeon% ruby -e 'p ((2.4/0.2).round)' > 12 > pigeon% As 2.4 /0.2 is fundementally 12, why should (2.4/0.2).floor or .truncate give 11? The method should be called on the result of the 2.4 / 0.2 calculation which is 12 or 12.0 and therefore the result should always be 12. Rob