MathGroup Archive 2004

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

Search the Archive

Re: How to printout more digits?


On 2/7/04 at 11:36 PM, meshii at mech.fukui-u.ac.jp (Toshiyuki (Toshi)
Meshii) wrote:


>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.

This is because 6. is a low precision number. You cannot get more precision in a result than the precision of the arguements.

Try Print[N[ 6 Pi, 9]]

>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.

Try Export["test.txt", N[{Pi,6 Pi},9], "CSV"]
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: How to printout more digits?
  • Next by Date: Re: How do I Copy an error message to a text document, as text?
  • Previous by thread: Re: How to printout more digits?
  • Next by thread: Re: How to printout more digits?