- Dr. Alistair Ward
- Exports functions involving integral powers.
- Iteratively generate sequential squares, from the specified initial value,
based on the fact that
(x + 1)^2 = x^2 + 2 * x + 1.
- The initial value doesn't need to be either positive or integral.
- Raise an arbitrary number to the specified positive integral power, using modular arithmetic.
- Implements exponentiation as a sequence of either squares or multiplications by the base; http://en.wikipedia.org/wiki/Exponentiation_by_squaring.