MathGroup Archive 2011

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

Search the Archive

N[] MachinePrecision vs. Arbitrary Precision

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118415] N[] MachinePrecision vs. Arbitrary Precision
  • From: Rafael Dunn <worthless.trash.junk at gmail.com>
  • Date: Wed, 27 Apr 2011 05:39:25 -0400 (EDT)

Mathematica 8.0.1.0, Mac OSX x86

In:=
N[Sin[Exp[100]]]
N[Sin[Exp[100]], 1]
N[Sin[Exp[100]], 11]

Out:=
-0.999105
0.1
0.14219812366

I realize that N[exp] = N[exp, MachinePrecision].  This indicates when 
N[] is asked to calculate to MachinePrecision, it produces an incorrect 
result in this example.  However, when I use N[exp,n] where n < 
MachinePrecision, I get a correct output.  Is this because N[exp,n] uses 
ExtraPrecision, while N[exp] does not?  If I set MaxExtraPrecision =
0, then N[exp,n] produces a result of 0 with the note that there are no 
significant digits to display until I have made n high enough for 
Mathematica to be able to internally compute it. 


  • Prev by Date: Drawing a vector list
  • Next by Date: Re: Mathematica loop question
  • Previous by thread: Re: Drawing a vector list
  • Next by thread: Re: N[] MachinePrecision vs. Arbitrary Precision