MathGroup Archive 2011

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

Search the Archive

Re: MachinePrecision vs. Arbitrary Precision

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118486] Re: MachinePrecision vs. Arbitrary Precision
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Fri, 29 Apr 2011 07:34:10 -0400 (EDT)

On 4/28/11 at 6:33 AM, mukasa at gmail.com (Sseziwa Mukasa) wrote:

>On Apr 27, 2011, at 5:39 AM, Rafael Dunn wrote:

>lthe behavior of N[e] and N[e,p] is different even if p
>= MachinePrecision,

Not correct as easily demonstrated by:

In[1]:=
a = RealDigits[N[Pi]];
p = MachinePrecision;
b = RealDigits[N[Pi, p]];
a === b

Out[4]= True

But note if you use $MachinePrecision instead of
MachinePrecision, then you do get a different behavior, i.e.

In[5]:= a = N[Pi, MachinePrecision]

Out[5]= 3.14159

In[6]:= b = N[Pi, $MachinePrecision]

Out[6]= 3.141592653589793

But what is being retained is still identical in both cases.

In[7]:= a === b

Out[7]= True



  • Prev by Date: Re: How to create such a list
  • Next by Date: Re: Same Programming Problem Implemented in Multiple Paradigms
  • Previous by thread: Re: MachinePrecision vs. Arbitrary Precision
  • Next by thread: Re: MachinePrecision vs. Arbitrary Precision