MathGroup Archive 2002

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

Search the Archive

Re: newbie question - printing Pi

  • To: mathgroup at smc.vnet.net
  • Subject: [mg33412] Re: [mg33369] newbie question - printing Pi
  • From: gleam at flashmail.com (Paul)
  • Date: Wed, 20 Mar 2002 01:53:25 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Jim,

I believe that this gives the result that you want, in the most
logical way I know:

TableForm[Fold[Partition, Drop @@ RealDigits[Pi, 10, 301], {5, 4}], 
  TableDirections -> {Column, Row, Row}]

Where 301 is the number of digits you want (including the integer
part, i.e. 3 in 3.14...), and {5, 4} specifies the dimensions that you
want (e.g. blocks of 5, in 4 columns).  The TableDirections option can
be used to specify alternate formatting, such as each digit block
written vertically ( {Column, Row, Column} ).


Paul


> How can I print Pi into a table (starting after the decimal point)
of 4 
> columns of 5 digits each - for the first say 300 digits?
>
> Jim



  • Prev by Date: Re: newbie question - printing Pi
  • Next by Date: Summing a list of real numbers
  • Previous by thread: Re: newbie question - printing Pi
  • Next by thread: Re: newbie question - printing Pi