Re: Possreps and numeric types

From: Marshall <marshall.spight_at_gmail.com>
Date: 26 Mar 2007 21:04:10 -0700
Message-ID: <1174968250.039663.301190_at_p77g2000hsh.googlegroups.com>


On Mar 26, 7:17 pm, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
> Marshall wrote:
> > On Mar 26, 5:46 pm, Matthias Klaey <m..._at_hotmail.com> wrote:
>
> >>"Marshall" <marshall.spi..._at_gmail.com> wrote:
>
> [snip]
>
> > When approximation occurs, in all cases it occurs in the
> > operators and not in the numbers.
>
> When you read a volt meter and write down 12V, are you suggesting 12 is
> the exact value? Or is it really 12V +/- 0.5V or 12V +/- 1V ? Or some
> other range?

Measurements are of course not exact values. However, when I tell my calculator that I have 12 volts running across a 3 ohm resistor, I wouldn't be happy if it told me that was 3.997 amperes, even though that answer is no less accurate that the measurements I took.

Furthermore, calculations on measurements are not the only thing numbers can do. I would also not be happy if it turned out my bank was using floating point math to calculate my interest, even if I could be assured that the overall error across all customers was small.

Suppose I am trying to calculate pi to some specific number of digits using some series. Suppose the series converges in the abstract, but the calculator I'm using introduces some modest amount of error with each operation. The series may not even converge any more.

Approximations absolutely have their uses. So do exact calculations.

> When the computer has 12 to operate on, how does the computer know the
> provenance and that it represented an exact value as opposed to some
> approximate measure?

Ah! This is exactly the internal predicate/external predicate dichotomy!
I have little to say on that specific topic.

However, let us suppose that sometimes one is giving the computer approximate measurements, and other times exact numbers. Would you prefer the system to assume your numbers were always approximate and sometimes be wrong, or would you rather the system assume your numbers are always exact and sometimes be wrong?

That is a false dichotomy, of course. The reality is that the programmer has full control over whether he is using exact or modular or approximate operations. Even in languages with automatic conversions such as C, a programmer rarely finds himself doing a floating point add when he meant to do a modular add.

Marshall Received on Tue Mar 27 2007 - 06:04:10 CEST

Original text of this message