Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class Multiplicative a where
- class (Additive a, Multiplicative a) => IDivisible a where
- class Multiplicative a => Divisible a where
- recip :: Divisible a => a -> a
Documentation
class Multiplicative a where Source #
Represent class of things that can be multiplied together
x * midentity = x midentity * x = x
Identity element over multiplication
(*) :: a -> a -> a infixl 7 Source #
Multiplication of 2 elements that result in another element
(^) :: (IsNatural n, IDivisible n) => a -> n -> a infixr 8 Source #
Raise to power, repeated multiplication e.g. > a ^ 2 = a * a > a ^ 10 = (a ^ 5) * (a ^ 5) .. (^) :: (IsNatural n) => a -> n -> a
class (Additive a, Multiplicative a) => IDivisible a where Source #
Represent types that supports an euclidian division
(x ‘div‘ y) * y + (x ‘mod‘ y) == x
class Multiplicative a => Divisible a where Source #
Support for division between same types
This is likely to change to represent specific mathematic divisions