Re: N with n-digit precision for 6<n<17
- To: mathgroup at smc.vnet.net
- Subject: [mg22607] Re: [mg22600] N with n-digit precision for 6<n<17
- From: "David Park" <djmp at earthlink.net>
- Date: Tue, 14 Mar 2000 22:46:23 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
>I need some numerical calculations where the numbers >are given with n-digit precision for 6<n<17. Thus for instance, >I use N[...,10]. But for n with 6<n<17, Mathematica always >gives 6-digit precision! Is it on purpose or is it a bug? > >M. Harborth. > Martin, In Version 4, N does not affect the number of digits displayed. The default is to always display 6 places of precision, except for trailing zeros. N[1.0/3, 10] 0.333333 The number is actually a machine precision number and I don't think the 10 actually did anything in the above statement. To display just 10 places you can use the number formatting command NumberForm: NumberForm[1.0/3, 10] 0.3333333333 If you regularly want to see 10 places, instead of the default 6 places, you can change the PrintPrecision setting in the Option Inspector. Follow the path Formatting Options -> Expression Formatting -> Display Options -> PrintPrecision. Edit the PrintPrecision value from 6 to 10 and Enter. Finally, if you wish to maintain control on the precision of your calculations, check out Section 3.1 Numbers, and especially Section 3.1.4 Numerical Precision in the Mathematica Book. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/