Re: Using N function
- To: mathgroup at smc.vnet.net
- Subject: [mg76281] Re: [mg76270] Using N function
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Sat, 19 May 2007 04:30:07 -0400 (EDT)
- References: <200705181031.GAA13821@smc.vnet.net>
On 18 May 2007, at 19:31, 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 > $MachinePrecision and MachinePrecision are different. The first is a number (evaluate it on your platform); on my I get: In[21]:= $MachinePrecision Out[21]= 15.9546 So N[ ,$MachinePrecision] is essenitally N[ ,16] - quite different forn N[] which is N[ ,MachinePrecision]. N[Exp[Sqrt[163] Pi] - 640320^3, MachinePrecision] 256. N[Exp[Sqrt[163] Pi] - 640320^3, $MachinePrecision] 743.9999999999993 Moral: $ still matters. Andrzej Kozlowski
- References:
- Using N function
- From: kkwweett <kkwweett@hotmail.fr>
- Using N function