On Sat, 20 Jan 2007, Drew Raines wrote:

> Wolfgang NĂ¡dasi-Donner wrote:
>
>> irb(main):001:0> 3930-39.30*100
>> => 4.54747350886464e-013
>>
>> Rounding errors are typical for floating point numbers. In this case
>> the result of -39.30*100 ist a little bit smaller than 3930, so to_i
>> works correct.
>
> When I think of rounding error, I think of lost precision due to
> rounding too early in a series of floating point calculations.  When
> multiplying a non-repeating Float point by 100, shouldn't the decimal
> move over two places without introducing extra precision?

no.  check out

   http://en.wikipedia.org/wiki/Floating_point#Computer_representation


-a
-- 
we can deny everything, except that we have the possibility of being better.
simply reflect on that.
- the dalai lama