Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Golf -- compute PI

by I0 (Priest)
on Apr 17, 2002 at 16:14 UTC ( #159872=note: print w/ replies, xml ) Need Help??


in reply to Golf -- compute PI

How about e:

use integer;$|++;my@e=(1)x5e3;for(a..zzz){$e[$_-1]+=$e[$_]/$_,$e[$_]%= +$_ for reverse 1..$#e;print$e[0];$e[0]=0;$_*=10for@e;}


Comment on Re: Golf -- compute PI
Download Code
Re^2: Golf -- compute PI
by thospel (Hermit) on Jan 21, 2007 at 12:21 UTC
    Compute e to 1000 digits, 69 chars
    s!\w+!$%=($z=$&.0+$%)/($a=--$?||10);$z%$a!eg,print$%for(-1x65536)x1e3

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://159872]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-08-29 05:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (275 votes), past polls