Personal tools

e.pl

From OrganicDesign Wiki

Jump to: navigation, search
# 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;
	}

The GNU Project Debian Linux Ubuntu Linux Wikipedia online encycopedia MediaWiki