From: Vincent Fourmond Date: 2006-10-07T20:26:51+09:00 Subject: Re: In the year 2525, afloat David Vallner wrote: > Suraj N. Kurapati wrote: >> Furthermore, what about automatic Float -> BigDecimal conversion? > > Wouldn't that only be possible if the processor reports if an IEEE > floating-point conversion / operation was inprecise / innacurate (can't > for the heck of it remember which term applies here.) > > Even if that was the case, that means that say a floating point division > would take would take one attempt, report that, convert the floating > point numbers to BigDecimals, and then perform the division in Ruby. I think that basically every operation on a number which doesn't have a natural writing in base 2 would trigger the conversion. That is, unless you do 2 * 0.5, you'll switch automatically to BigDecimal. Bad idea. Why don't you use BigDecimal systematically, if you're really worried about precision ? Cheers ! Vince