       Re: Bug 1+4/10

• To: mathgroup at smc.vnet.net
• Subject: [mg120157] Re: Bug 1+4/10
• From: Richard Fateman <fateman at cs.berkeley.edu>
• Date: Sun, 10 Jul 2011 05:02:02 -0400 (EDT)
• References: <iv9ekf\$ddj\$1@smc.vnet.net>

```On 7/9/2011 4:38 AM, Bill Rowe wrote:
> On 7/8/11 at 4:50 AM, human at site.pl (slawek) wrote:
>
>> U=C2=BFytkownik "Oleksandr Rasputinov"  napisa=C2=B3 w wiadomo=C2=B6ci grup
>> dyskusyjnych:iv456e\$eop\$1 at smc.vnet.net...
>
>>> Proper treatment of inexact numbers requires at least some care and
>
>> There is no "inexact numbers". There are only inexact computations
>> and/or measurements.

yes

>
>> 3.14 is an approximation of pi, but it is exactly 3+1/10+4/100

no, 3.14d0 ordinarily is exactly equal to

7070651414971679 * 2 ^(-51)

or as a rational number,

7070651414971679/2251799813685248

but 3+ 1/10 + 4/100  is exactly equal to

157/50

The two numbers in question differ by
7/56294995342131200
or approximately

1.2434497875801754d-16

>
> Quite simply, on any modern computer using floating point
> arithmetic it is not true that 3.14 is exactly 3+1/10+4/100.

no, but it is very likely to be exactly 3.0d0 + 1.0d-1 + 4.0d-2.
Thus for computer languages which do not allow for rational numbers,
but use floating point to convert 1/10 to 1.0d-1 etc. it might
be true that this is exactly equal to 3.14d0.

I must say that it is odd to seem to be arguing about the
value for (3+1/10+4/100).  But it is possible to do so if one
ambiguously refers to it as "what is true mathematically", "what
is true for Mathematica" and "what is true in other programming
languages" ... or perhaps "what is true of IEEE double-floats" or
"what is true of IEEE double-floats not in registers [i.e. IEEE
extended floats]"...

(This should have nothing whatsoever to do with "distributions".)

When one is referring to Mathematica, it is possible to say truthfully
that Mathematica believes that 0.==1.  for some values of 0. and 1.
That is a consequence of believing numbers should be "distributions".

> Floating point arithmetic as implemented in modern computers
> simply does not work that way and has not on any mainstream
> machine made in the past 10 years or so.

Did something happen 11 years ago?

And this is totally
> independent of Mathematica.

Note that computers which implement IEEE DECIMAL floats [a different
standard from IEEE 754 binary floats] this could be true.
>

```

• Prev by Date: Re: Incredible slow Plot
• Next by Date: Re: Incredible slow Plot
• Previous by thread: Re: Bug 1+4/10
• Next by thread: Unwanted Recursion