factory-0.2.1.1: Rational arithmetic in an irrational world.

Safe HaskellSafe-Inferred
LanguageHaskell98

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.

Constructors

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.