MathGroup Archive 2007

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

Search the Archive

Re: Using N function


kkwweett wrote:

>Good morning Mathematica users,
>
>
>Can anyone tell me, please, which of a),b) or c) is wrong :
>
>a)
><MathematicaHelp>
><quote>
>
>N[expr] is equivalent to N[expr, MachinePrecision].
>
></quote>
></MathematicaHelp>
>
>b)
>In[1]:=N[Exp[Sqrt[163 ]Pi] - 640320^3]
>Out[1]=256.
>
>
>c)
>In[2]:=N[Exp[Sqrt[163 ]Pi] - 640320^3,$MachinePrecision]
>Out[2]=743.9999999999993
>
>?
>
>Thank you
>  
>
None of them are wrong. Perhaps you meant to use the following in part c?

In[32]:= N[Exp[Sqrt[163] Pi] - 640320^3, MachinePrecision]
Out[32]= 256.

Note the use of MachinePrecision instead of $MachinePrecision.

Carl Woll
Wolfram Research


  • Prev by Date: Re: 64-bit again
  • Next by Date: [6] how to print or save help pages ? PDF?
  • Previous by thread: Using N function
  • Next by thread: Re: Using N function