W3C home > Mailing lists > Public > www-ql@w3.org > October to December 2003

Re: precision on op:numeric-divide

From: <Damien@sodatech.com>
Date: Wed, 10 Dec 2003 19:16:06 +1100
To: Per Bothner <per@bothner.com>
Cc: www-ql@w3.org
Message-ID: <20031210081606.GA1496@laptop>

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:17:16 UTC