Documentation for routine exp
assembled from the following pages:
Class: Numeric §
From Numeric
(Numeric) routine exp §
multi sub exp(Numeric, Numeric = e --> Numeric)multi method exp(Numeric: Numeric = e --> Numeric)
Returns $base
to the power of the number, or e
to the power of the number if called without a second argument.
Class: Cool §
From Cool
(Cool) routine exp §
Defined as:
multi sub exp(Cool , Cool ?)multi method exp(Cool: Cool ?)
Coerces the arguments (including the invocant in the method from) to Numeric, and returns $base
raised to the power of the first number. If no $base
is supplied, e
(Euler's Number) is used.
say 0.exp; # OUTPUT: «1» say 1.exp; # OUTPUT: «2.71828182845905» say 10.exp; # OUTPUT: «22026.4657948067»