On 7/28/06, Phil M <[EMAIL PROTECTED]> wrote:
On Jul 28, 2006, at 10:35 AM, Peter K. Stys wrote:
> Interesting discussion. To muddy the waters further, using
> Mathematica:
>
> N[72/2000, 100] (ie calculate to 100 significant digits of precision)
>
> you get:
>
> 0.03600000000000000000000000000000000000000000000000000000000000000000
> 000000000000000000000000000000000
>
> No argument here, 72/2000 is really 0.036 exactly.
>
> As people said, this real number may not be representable exactly as a
> binary floating point number, however:
>
> N[72/2000] (calculate to machine precision)
>
> gives 0.036, implying that the machine is indeed able to represent
> 0.036 exactly.
Yes, Calculator.app shows exactly "0.036" even with 16 digit
precision. Now try "0.036 * 750".
In[26]:= N[72/2000*750,100]
Out[26]=
27.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
In[27]:= N[72/2000*750]
Out[27]= 27.
Still suggests all these numbers and intermediate results are
representable exactly at machine precision.
Odd indeed.
P.
--
-------------------------------------------------------------------------------
Peter K. Stys, MD
Professor of Medicine(Neurology), Senior Scientist
Ottawa Health Research Institute, Div. of Neuroscience
Ottawa Hospital / University of Ottawa
Ontario, CANADA
tel: (613)761-5444
fax: (613)761-5330
http://www.ohri.ca/profiles/stys.asp
-------------------------------------------------------------------------------
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>