Alt e.pl

From Organic Design wiki
Revision as of 01:11, 12 July 2007 by Nad (talk | contribs)
  1. Returns e^x from e( x, iterations )Our Perl scripts.

sub e { $x = $y = shift; $top = $bot = 1; for $n ( 1 .. shift ) { $y = $y + $x; $top = $top * $n + $y; $bot = $bot * $n; } return $top / $bot; }