MathGroup Archive 2004

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

Search the Archive

Re: How to printout more digits?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46165] Re: How to printout more digits?
  • From: drbob at bigfoot.com (Bobby R. Treat)
  • Date: Mon, 9 Feb 2004 05:54:13 -0500 (EST)
  • References: <c04f0p$ggi$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Ultimately, NumberForm is your friend.

Here are some experiments that may help:

6Pi // Precision
6.Pi // Precision
6.Pi // FullForm
N[6.Pi] // FullForm
N[6.Pi, 100] // FullForm
N[6.Pi, 9] // FullForm
6.Pi
N[6.Pi, 9]
6Pi
N[6Pi, 9]
NumberForm[6.Pi, 9]
Print at NumberForm[6.Pi, 9]

N can't give more precision than its argument already has, so
increasing the second argument to 100 makes no difference; 6. is
machine precision, so 6. Pi is also machine precision. You're seeing a
default output format for machine precision numbers when you use
Print, or just enter the expression as above. But NumberForm allows
you to control that format.

Bobby

"Toshiyuki \(Toshi\) Meshii" <meshii at mech.fukui-u.ac.jp> wrote in message news:<c04f0p$ggi$1 at smc.vnet.net>...
> Hello,
> 
> I want to print out (or write to a file) outputs with more than 9 digits.
> For example, I know that
> 
> Print[ N[Pi, 9] ]
> returns
> 3.14159265
> ,which is OK.
> 
> But,
> Print[ N[6. * Pi, 9] ]
> returns
> 18.8496
> which is only 6 digits and not what I expected.
> 
> Does anybody know how to print out outputs with more than 9 digits?
> 
> In addition, I want to write the outputs in a file, such as csv files.
> If you know ideas for this, please let me know too.
> 
> -Toshi


  • Prev by Date: Re: Mathematical Statistics
  • Next by Date: Re: How to printout more digits?
  • Previous by thread: Re: How to printout more digits?
  • Next by thread: Re: How to printout more digits?