Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #1905 > unrolled thread

N[] MachinePrecision vs. Arbitrary Precision

Started byRafael Dunn <worthless.trash.junk@gmail.com>
First post2011-04-27 09:39 +0000
Last post2011-04-27 09:39 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  N[] MachinePrecision vs. Arbitrary Precision Rafael Dunn <worthless.trash.junk@gmail.com> - 2011-04-27 09:39 +0000

#1905 — N[] MachinePrecision vs. Arbitrary Precision

FromRafael Dunn <worthless.trash.junk@gmail.com>
Date2011-04-27 09:39 +0000
SubjectN[] MachinePrecision vs. Arbitrary Precision
Message-ID<ip8o8n$pj3$1@smc.vnet.net>
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. 

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web