NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
shouldn't this be optional (Score:1)
How about
sub fact
{
my ( $n ) = @_;
my @s = ();
$s[0] = 1;
foreach my $m ( 1 .. $n ) .. $k )
{
$s[$m] = 0;
for( my $k = $m;$k>=1;$k--)
{
foreach my $i ( 1
{
$s[$i] += $s[$i-1];
}
}
}
return $s[$n];
}
Loads more available at http://www.luschny.de/math/factorial/FastFactorialFunctions.htm [luschny.de]
Reply to This