sub e{
my @e=(1)x shift;
my $f="%d.";
local $|=1;
for(1..@e*log(@e)/11){
for(reverse(1..$#e)){
$e[$_-1]+=$e[$_]/$_;
$e[$_]=10000*($e[$_]%$_)
}
printf$f,$e[0];
$e[0]=0;
$f="%04d";
}
}
Snippets of code should be wrapped in
<code> tags not<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).