Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

`AUTHOR`

- Dr. Alistair Ward
`DESCRIPTION`

- Exports functions involving integral powers.

# Functions

- 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; https://en.wikipedia.org/wiki/Exponentiation_by_squaring. - https://en.wikipedia.org/wiki/Modular_exponentiation.