Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Possreps and numeric types

Re: Possreps and numeric types

From: Marshall <marshall.spight_at_gmail.com>
Date: 26 Mar 2007 20:10:23 -0700
Message-ID: <1174965023.281868.80120@y66g2000hsf.googlegroups.com>


On Mar 26, 5:46 pm, Matthias Klaey <m..._at_hotmail.com> wrote:
> "Marshall" <marshall.spi..._at_gmail.com> wrote:
>
> I used to teach that if you calculate "2 + 2" on a computer, the
> result would be somewhere between 3 and 5, and you could not tell what
> it is *exactly*, but it would be *exactly* the same number how many
> times you repeated the calculation.

I can think of at least three different kinds of addition that a computer can do: exact with fault on overflow, ring addition (the most common), and floating point addition. The first one either returns an exact result of else faults; the second two always succeed but sometimes return an approximation of the correct answer.

In all three cases, 2+2 = 4, exactly. For that particular case, all three operators return the exactly correct result.

> Thus: no, there is no *approximation* in the *operators*, or to be
> more precise, the algorithms that implement the high level "+" and
> other arithmeic operations. There is a problem in the range of inputs
> these algorithms can deal with: They cannot return the exact result in
> almost all cases (meaning, in all cases except a finite number). This
> is a fundamental limit of all finite computers.

Uh, yeah, well, that's just exactly the idea that I'm saying is wrong. The numbers are all exact. Some of the operators return exact numbers that are approximations of the correct result.

When approximation occurs, in all cases it occurs in the operators and not in the numbers.

Marshall Received on Mon Mar 26 2007 - 22:10:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US