exp
ErrorsCollection

exp

Synthesised documentation from type/Numeric type/Cool

From type/Numeric

See Original text in context

multi sub    exp(Numeric:DNumeric:D $base = e --> Numeric:D)
multi method exp(Numeric:D: Numeric:D $base = e --> Numeric:D)

Returns $base to the power of the number, or e to the power of the number if called without a second argument.

From type/Cool

See Original text in context

multi sub exp(Cool:D $powCool:D $base?)
multi method exp(Cool:D: Cool:D $base?)

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␤»