PassiveSupport.Math.pow
You're seeing just the function
pow
, go back to PassiveSupport.Math module for more information.
Link to this function
pow(base, exponent)
Specs
Raises base
to the power of exponent
.
Since :math.pow/2
always does floating point arithmetic, whereas
PassiveSupport.Integer.exponential/2
will do arbitrary precision arithmetic
if the exponent
is a positive integer, Math.pow/2
checks the types of
base
and exponent
and delegates out to the appropriate function based on
what it finds.
Examples
iex> pow(2, 5)
32
iex> pow(2, 5.0)
32.0
iex> pow(2, 200)
1606938044258990275541962092341162602522202993782792835301376
iex> pow(2.0, 2000)
** (ArithmeticError)