Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Why?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110010] Re: Why?
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Fri, 28 May 2010 07:23:42 -0400 (EDT)

On 5/27/10 at 6:46 AM, lehin.p at gmail.com (Alexey) wrote:

>In[1]:= N[1.000000000000000000000001 - 1, 60]

>Out[1]= 0.*10^-24

>I can not understand why this happens. Can anyone explain the
>reason? What is about "arbitrary precision arithmetics"?

The problem is you are attempting to convert a number from one
precision to a higher precision. That is:

In[9]:= Precision[1.000000000000000000000001]

Out[9]= 24.

But if you had entered the real value as having 60 digit
precision things would work as you expect. That is:

In[10]:= 1.000000000000000000000001`60 - 1

Out[10]= 1.00000000000000000000000000000000000*10^-24

or you could have started with exact values and used N to
convert then to 60 digit precision, i.e.,

In[11]:= N[1 + 10^-24, 60] - 1

Out[11]= 1.00000000000000000000000000000000000*10^-24



  • Prev by Date: Lists: how to?
  • Next by Date: Re: exporting publishable 3D graphics
  • Previous by thread: Re: Why?
  • Next by thread: Re: Why?