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

Language | Haskell2010 |

`AUTHOR`

- Dr. Alistair Ward
`DESCRIPTION`

- Provides various
*hyperoperations*; https://en.wikipedia.org/wiki/Hyperoperation.

- type Base = Integer
- type HyperExponent = Base
- succession :: Int
- addition :: Int
- multiplication :: Int
- exponentiation :: Int
- tetration :: Int
- pentation :: Int
- hexation :: Int
- hyperoperation :: (Integral rank, Show rank) => rank -> Base -> HyperExponent -> Base
- ackermannPeter :: (Integral rank, Show rank) => rank -> HyperExponent -> Base
- powerTower :: (Integral base, Integral hyperExponent, Show base) => base -> hyperExponent -> base
- areCoincidental :: (Integral rank, Show rank) => Base -> HyperExponent -> [rank] -> Bool

# Types

## Type-synonyms

type HyperExponent = Base Source #

- Merely to enhance self-documentation.
- CAVEAT: whilst
`Base`

and`HyperExponent`

can be independent types for both`exponentiation`

and`tetration`

, they interact for other*hyper-exponents*.

# Constants

succession :: Int Source #

multiplication :: Int Source #

exponentiation :: Int Source #

# Functions

hyperoperation :: (Integral rank, Show rank) => rank -> Base -> HyperExponent -> Base Source #

The *hyperoperation*-sequence; https://en.wikipedia.org/wiki/Hyperoperation.

ackermannPeter :: (Integral rank, Show rank) => rank -> HyperExponent -> Base Source #

The *Ackermann-Peter*-function; https://en.wikipedia.org/wiki/Ackermann_function#Ackermann_numbers.

powerTower :: (Integral base, Integral hyperExponent, Show base) => base -> hyperExponent -> base Source #

- Returns the
*power-tower*of the specified*base*; http://mathworld.wolfram.com/PowerTower.html. - A synonym for
*tetration*; https://en.wikipedia.org/wiki/Tetration, http://www.tetration.org/Fractals/Atlas/index.html.

## Predicates

areCoincidental :: (Integral rank, Show rank) => Base -> HyperExponent -> [rank] -> Bool Source #

True if `hyperoperation base hyperExponent`

has the same value for each specified `rank`

.