Re: newbie question - printing Pi
- To: mathgroup at smc.vnet.net
- Subject: [mg33386] Re: [mg33369] newbie question - printing Pi
- From: Tomas Garza <tgarza01 at prodigy.net.mx>
- Date: Mon, 18 Mar 2002 23:39:01 -0500 (EST)
- References: <200203180518.AAA07512@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
We could write a one-liner, but in order to make it readable, I propose the
following:
In[1]:=
a = Partition[Rest[RealDigits[N[Pi, 301]][[1]]], 5];
In[2]:=
b = ((ToString[#1] & ) /@ #1 & ) /@ a;
In[3]:=
TableForm[Transpose[Partition[(StringJoin[#1] & ) /@ b,
15]]]
Strings must be used in order to preserve the five-digit objects beginning
with a zero.
Tomas Garza
Mexico City
----- Original Message -----
From: "Jim Grieve" <jgrieve at mindspring.com>
To: mathgroup at smc.vnet.net
Subject: [mg33386] [mg33369] newbie question - printing Pi
> 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
>
>
> ==============================================================
> Posted with Hogwasher. Mac first, Mac only:
> http://www.asar.com/cgi-bin/product.pl?58/hogwasher.html
> ==============================================================
>
>
- References:
- newbie question - printing Pi
- From: Jim Grieve <jgrieve@mindspring.com>
- newbie question - printing Pi