numeric-prelude-0.1.3.4: An experimental alternative hierarchy of numeric type classes

Algebra.Real

Synopsis

Documentation

class (C a, C a, Ord a) => C a whereSource

This is the type class of an ordered ring, satisfying the laws

              a * b === b * a
      a + (max b c) === max (a+b) (a+c)
   negate (max b c) === min (negate b) (negate c)
      a * (max b c) === max (a*b) (a*c) where a >= 0

Note that abs is in a rather different place than it is in the Haskell 98 Prelude. In particular,

   abs :: Complex -> Complex

is not defined. To me, this seems to have the wrong type anyway; Complex.magnitude has the correct type.

Methods

abs :: a -> aSource

signum :: a -> aSource

Instances

C Double 
C Float 
C Int 
C Int8 
C Int16 
C Int32 
C Int64 
C Integer 
C Word 
C Word8 
C Word16 
C Word32 
C Word64 
C T 
C T 
C T 
(C a, C a) => C (T a) 
(C a, C a) => C (T a) 
(C a, C a, C a) => C (T a) 
C v => C (T a v) 
(Ord i, C a) => C (T i a) 
C v => C (T a v)