factory-0.3.0.0: Rational arithmetic in an irrational world.

Safe HaskellSafe
LanguageHaskell2010

Factory.Data.Exponential

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION

Synopsis

Types

Type-synonyms

type Exponential base exponent = (base, exponent) Source #

Describes an exponential, in terms of its base and exponent.

Functions

evaluate :: (Num base, Integral exponent) => Exponential base exponent -> base Source #

Evaluate the specified Exponential, returning the resulting number.

invert :: Num exponent => Exponential base exponent -> Exponential base exponent Source #

Invert the value, by negating the exponent.

Accessors

getBase :: Exponential base exponent -> base Source #

Accessor.

getExponent :: Exponential base exponent -> exponent Source #

Accessor.

Constructor

rightIdentity :: Num exponent => base -> Exponential base exponent Source #

Operators

(<^) infixr 8 Source #

Arguments

:: Num exponent 
=> Exponential base exponent

The operand.

-> exponent

The power to which the exponential is to be raised.

-> Exponential base exponent

The result.

Raise the specified Exponential to a power.

(=~) :: Eq base => Exponential base exponent -> Exponential base exponent -> Bool infix 4 Source #

True if the bases are equal.