in reply to Pascal's triangle...
Using an approximation to Stirling's series:
use constant PI => 3.141592653589793238; ... sub factorial { my $n = shift; return (sqrt((2*$n + 1/3)*PI)*($n**$n)*exp(-$n)); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Pascal's triangle...
by particle (Vicar) on Jun 19, 2002 at 11:25 UTC | |
by merlyn (Sage) on Jun 19, 2002 at 13:16 UTC | |
by jeffa (Bishop) on Jun 19, 2002 at 17:51 UTC | |
by particle (Vicar) on Jun 19, 2002 at 22:14 UTC | |
by YuckFoo (Abbot) on Jun 20, 2002 at 19:23 UTC | |
by gumby (Scribe) on Jun 19, 2002 at 11:45 UTC | |
by theorbtwo (Prior) on Jun 19, 2002 at 22:26 UTC | |
Re(2): Pascal triange...
by gumby (Scribe) on Jun 19, 2002 at 10:40 UTC |
In Section
Seekers of Perl Wisdom