Re: Possreps and numeric types
From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Mon, 26 Mar 2007 14:42:29 GMT
Message-ID: <pZQNh.15473$PV3.159172_at_ursa-nb00s0.nbnet.nb.ca>
>
> rationals,
>
>
> within
>
>
> then
>
>
> representable.
>
>
> are
>
>
> finite
>
>
> exactly a
>
>
> of
>
>
> one is
>
>
> the
>
>
> entirely.
>
> I must have misread you. Sorry.
Date: Mon, 26 Mar 2007 14:42:29 GMT
Message-ID: <pZQNh.15473$PV3.159172_at_ursa-nb00s0.nbnet.nb.ca>
David Cressey wrote:
> "Bob Badour" <bbadour_at_pei.sympatico.ca> wrote in message
> news:HfPNh.15436$PV3.159008_at_ursa-nb00s0.nbnet.nb.ca...
>
>>David Cressey wrote: >> >> >>>"Marshall" <marshall.spight_at_gmail.com> wrote in message >>>news:1174863816.647794.146930_at_d57g2000hsg.googlegroups.com... >>> >>> >>>>On Mar 25, 1:30 pm, Bob Badour <bbad..._at_pei.sympatico.ca> wrote: >>>> >>>> >>>>>Marshall wrote: >>>>> >>>>> >>>>> >>>>>>So what if we had an internal representation for >>>>>>integer similar to java.math.BigInteger, and an >>>>>>internal representation for rational that was a pair >>>>>>of integers. We can define *exact* operators for >>>>>>these types for basic arithmetic functions. >>>>> >>>>>I disagree. Unless one has infinite precision, rational is >>>>>always an approximation. >>>> >>>>"Approximation" is perhaps not the best choice of words. >>>>We certainly have resource limits in our finite computers. >>>>There are computations that we can't do because >>>>we don't have the resources. For example, a computer >>>>might be able to add together two one billion digit >>>>integers, but not be able to add together two ten billion >>>>digit integers because it didn't have enough memory. >>>>That doesn't mean the result of adding the two >>>>one billion digit integers is approximate; on the >>>>contrary, it is precise and exact. Or consider >>>>java.util.BigInteger. Any answer you get from it >>>>will be precise, and it can handle up to four >>>>billion digit numbers. If it can't give you an answer, >>>>it'll fail in a way that can't be mistaken for an >>>>answer. >>> >>>I disagree with Bob. If pairs of integers are used to represent
>
> rationals,
>
>>>rational(N,M) = N/M, >>>Then any rational can be represented exactly (not an approximation)
>
> within
>
>>>the scheme, provided that N and M can both be represented within the >>>scheme. >>> >>>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. >>> >>>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. >> >>How exactly are you disagreeing with me? It seems to me you agree
>
> entirely.
>
> I must have misread you. Sorry.
I must not have been clear enough. Sorry. Received on Mon Mar 26 2007 - 16:42:29 CEST
