Float.pow

You're seeing just the function pow, go back to Float module for more information.
Link to this function

pow(base, exponent)

View Source (since 1.12.0)

Specs

pow(float(), number()) :: float()

Computes base raised to power of exponent.

base must be a float and exponent can be any number. However, if a negative base and a fractional exponent are given, it raises ArithmeticError.

It always returns a float. See Integer.pow/2 for exponentiation that returns integers.

Examples

iex> Float.pow(2.0, 0)
1.0
iex> Float.pow(2.0, 1)
2.0
iex> Float.pow(2.0, 10)
1024.0
iex> Float.pow(2.0, -1)
0.5
iex> Float.pow(2.0, -3)
0.125

iex> Float.pow(3.0, 1.5)
5.196152422706632

iex> Float.pow(-2.0, 3)
-8.0
iex> Float.pow(-2.0, 4)
16.0

iex> Float.pow(-1.0, 0.5)
** (ArithmeticError) bad argument in arithmetic expression