Re: Possreps and numeric types

From: David Cressey <cressey73_at_verizon.net>
Date: Tue, 27 Mar 2007 06:05:04 GMT
Message-ID: <ku2Oh.2384$J21.781_at_trndny03>


"Bob Badour" <bbadour_at_pei.sympatico.ca> wrote in message news:Y6XNh.15604$PV3.159796_at_ursa-nb00s0.nbnet.nb.ca...
> Marshall wrote:
>
> > On Mar 26, 2:39 am, "David Cressey" <cresse..._at_verizon.net> wrote:
> >
> >>"Marshall" <marshall.spi..._at_gmail.com> wrote in message
> >>
> >>If the representation scheme for integers is indefinitely extensible,
then
> >>the field of rationals representable is likewise indefinitely
representable.
> >>Common decimal notation of integers is indefinitely extensible. There
are
> >>other schemes.
> >
> > Right.
> >
> >
> >
> >>In any finite computer, it is only possible to actually represent a
finite
> >>subset of the integers, and thus it is only possible to represent
exactly a
> >>finite subset of the rationals. The problem is that the finite subset
of
> >>rationals will not, in general, exhibit closure under addition. Thus
one is
> >>forced into the realm of approximation as soon as one begins to store
the
> >>results of arithmetic computation.
> >
> > Well, again I object to the word "approximation." The result of a
> > rational addition will either be an exact correct answer or a
> > failure due to hitting a resource limitation. I would *not* call
> > that an approximation.
>
> I don't think I would call resource exhaustion an acceptable limitation
> when adding two numbers both approximately equal to 1.

Just as a humorous digression, the Calculator utility released with windows 3.1 had a bug in the way it handled approximations. If you started with zero, subtracted 0.1, then added 0.1 you would get an answer slightly different from zero. I may be wrong about the value "0.1" but it was some relatively pedestrian decimal fraction, that might easily occur in practice. There was a patch release later that fixed this. Received on Tue Mar 27 2007 - 08:05:04 CEST

Original text of this message