Re: Re: Confused about precision vs accuracy
- To: mathgroup at smc.vnet.net
- Subject: [mg90434] Re: [mg90375] Re: Confused about precision vs accuracy
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Wed, 9 Jul 2008 04:54:21 -0400 (EDT)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <g4smav$29$1@smc.vnet.net> <200807080623.CAA17949@smc.vnet.net>
- Reply-to: murray at math.umass.edu
Of course the expression N[expr, digits] will not necessarily show you
"digits" digits of expr when expr is not an exact quantity. For example:
N[Sin[1.], 12]
0.841471
despite:
Precision[%]
MachinePrecision
N[MachinePrecision] (* on my machine *)
15.9546
But:
NumberForm[N[Sin[1.]], 12]
0.841470984808
There's a difference in the value of an N expression and what is
displayed in the Output cell.
Bob F wrote:
>
> Just use the N[expr,digits] function, e.g., if you wanted to see
> several values of Pi you could:
>
> Table[N[Pi,i],{i,5,50,10}] would give
>
> {3.1416, 3.14159265358979, 3.141592653589793238462643, \
> 3.1415926535897932384626433832795029, \
> 3.14159265358979323846264338327950288419716940}
>
> So you could use any value for "expr" in the N[expr, digits] function
> call - not just for Pi or other constants.
--
Murray Eisenberg murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305
- References:
- Re: Confused about precision vs accuracy
- From: Bob F <deepyogurt@gmail.com>
- Re: Confused about precision vs accuracy