factory-0.3.2.3: Rational arithmetic in an irrational world.
Safe HaskellNone
LanguageHaskell2010

Factory.Data.Ring

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Synopsis

Type-classes

class Ring r where Source #

Methods

(=+=) infixl 6 Source #

Arguments

:: r 
-> r 
-> r

Addition of two members; required to be commutative; https://en.wikipedia.org/wiki/Commutativity.

(=*=) infixl 7 Source #

Arguments

:: r 
-> r 
-> r

Multiplication of two members.

additiveInverse Source #

Arguments

:: r 
-> r

The operand required to yield zero under addition; https://en.wikipedia.org/wiki/Additive_inverse.

multiplicativeIdentity Source #

Arguments

:: r

The identity-member under multiplication; https://mathworld.wolfram.com/MultiplicativeIdentity.html.

additiveIdentity Source #

Arguments

:: r

The identity-member under addition (AKA zero); https://en.wikipedia.org/wiki/Additive_identity.

(=-=) infixl 6 Source #

Arguments

:: r 
-> r 
-> r

Subtract the two specified ring-members.

square Source #

Arguments

:: r 
-> r

Square the ring.

Types

Data-types

Functions

product' :: Ring r => BisectionRatio -> MinLength -> [r] -> r Source #

Returns the product of the list of ring-members.

sum' :: Ring r => BisectionRatio -> MinLength -> [r] -> r Source #

Returns the sum of the list of ring-members.

Operators

(=^) :: (Eq r, Integral power, Ring r, Show power) => r -> power -> r infixr 8 Source #