# `Numbers.Protocols.Exponentiation`

For supporting `Numbers.pow/2`.

# `t`

```elixir
@type t() :: term()
```

All the types that implement this protocol.

# `pow`

```elixir
@spec pow(t(), non_neg_integer()) :: t()
```

Power function, x^n.

Unless a dedicated fast power algorithm exists for your data structure,
you could use the 'Exponentiation by Squaring' algorithm, by calling
`Numbers.Helper.pow_by_sq(num, integer_power)` in the implementation,
which is a reasonably fast algorithm that uses `log(n)` multiplication steps.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
