Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Provides various hyperoperations; http://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
andHyperExponent
can be independent types for bothexponentiation
andtetration
, they interact for other hyper-exponents.
Constants
succession :: Int Source
Functions
hyperoperation :: (Integral rank, Show rank) => rank -> Base -> HyperExponent -> Base Source
The hyperoperation-sequence; http://en.wikipedia.org/wiki/Hyperoperation.
ackermannPeter :: (Integral rank, Show rank) => rank -> HyperExponent -> Base Source
The Ackermann-Peter-function; http://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; http://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
.