e.pl

From Organic Design wiki
# Returns e^x from e( x, iterations )
sub e {
	$x = shift;
	$e = $top = $bot = 1;
	for $n ( 1 .. shift ) {
		$top = $top * $x;
		$bot = $bot * $n;
		$e = $e + $top / $bot;
	}
	return $e;
}