On Wed, 2004-05-12 at 15:35, Hal Fulton wrote:
> Mohammad Khan wrote:
> > I guess, you guys are missing the point,
> >
> > in real life you can't have exact answer of 1/3 + 2.3 + 1.3
> > but you can have exact answer of 625.91 + 900.00 + 22.00
>
> Only if you build a computer that works in decimal. In binary,
> 625.91 is as inexact as 1/3 is in decimal.
Well, my HP48 calculator's processor is able to do math in binary or
decimal. The real numbers are stored in memory in decimal and the
operations by default made in decimal. It doesn't make my calculations
any more precise, but it made (some of) the rounding errors less
suprising.
But Ruby doesn't compile on my HP48 :(
Guillaume.