Re: precision on op:numeric-divide

On Tue, Dec 09, 2003 at 09:03:08PM -0800, Per Bothner wrote:
> 
> >Finally, exact rationals, while perhaps desirable in some cases, can lead 
> >to
> >an explosion in memory usage if not controlled carefully, since there is no
> >upper bound on the precision used in the calculations.  A simple example:
> >compute (1/2)^n, for some very large n.
> 
> How is this different from 2^n for some very large n?

My example wasn't the best.  What I am trying to say is that repeatedly
performing a division a / b (with b > a) can very quickly lead to
unbounded growth in the height of the answer, whereas this is not the
case with floating point or integer division.

Controlling this can be difficult.  It does not mean exact rationals
have no uses, just that they are not as useful as many people expect.

Received on Wednesday, 10 December 2003 03:17:57 UTC