numeric-prelude-0.4.4: An experimental alternative hierarchy of numeric type classes
Copyright(c) Henning Thielemann 2011-2012
(c) Dylan Thurston 2006
Maintainernumericprelude@henning-thielemann.de
Stabilityprovisional
Portabilityportable (?)
Safe HaskellSafe-Inferred
LanguageHaskell98

Number.Ratio

Description

Ratios of mathematical objects.

Synopsis

Documentation

data T a Source #

Constructors

(:%) 

Fields

Instances

Instances details
C a => C Integer (T a) Source # 
Instance details

Defined in Algebra.Module

Methods

(*>) :: Integer -> T a -> T a Source #

Eq a => Eq (T a) Source # 
Instance details

Defined in Number.Ratio

Methods

(==) :: T a -> T a -> Bool #

(/=) :: T a -> T a -> Bool #

Integral a => Fractional (T a) Source # 
Instance details

Defined in Number.Ratio

Methods

(/) :: T a -> T a -> T a #

recip :: T a -> T a #

fromRational :: Rational -> T a #

Integral a => Num (T a) Source # 
Instance details

Defined in Number.Ratio

Methods

(+) :: T a -> T a -> T a #

(-) :: T a -> T a -> T a #

(*) :: T a -> T a -> T a #

negate :: T a -> T a #

abs :: T a -> T a #

signum :: T a -> T a #

fromInteger :: Integer -> T a #

(Ord a, C a) => Ord (T a) Source # 
Instance details

Defined in Number.Ratio

Methods

compare :: T a -> T a -> Ordering #

(<) :: T a -> T a -> Bool #

(<=) :: T a -> T a -> Bool #

(>) :: T a -> T a -> Bool #

(>=) :: T a -> T a -> Bool #

max :: T a -> T a -> T a #

min :: T a -> T a -> T a #

(Read a, C a) => Read (T a) Source # 
Instance details

Defined in Number.Ratio

Methods

readsPrec :: Int -> ReadS (T a) #

readList :: ReadS [T a] #

readPrec :: ReadPrec (T a) #

readListPrec :: ReadPrec [T a] #

(Show a, C a) => Show (T a) Source # 
Instance details

Defined in Number.Ratio

Methods

showsPrec :: Int -> T a -> ShowS #

show :: T a -> String #

showList :: [T a] -> ShowS #

(Arbitrary a, C a, C a) => Arbitrary (T a) Source # 
Instance details

Defined in Number.Ratio

Methods

arbitrary :: Gen (T a) #

shrink :: T a -> [T a] #

(Storable a, C a) => Storable (T a) Source # 
Instance details

Defined in Number.Ratio

Methods

sizeOf :: T a -> Int #

alignment :: T a -> Int #

peekElemOff :: Ptr (T a) -> Int -> IO (T a) #

pokeElemOff :: Ptr (T a) -> Int -> T a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (T a) #

pokeByteOff :: Ptr b -> Int -> T a -> IO () #

peek :: Ptr (T a) -> IO (T a) #

poke :: Ptr (T a) -> T a -> IO () #

(Random a, C a, C a) => Random (T a) Source # 
Instance details

Defined in Number.Ratio

Methods

randomR :: RandomGen g => (T a, T a) -> g -> (T a, g) #

random :: RandomGen g => g -> (T a, g) #

randomRs :: RandomGen g => (T a, T a) -> g -> [T a] #

randoms :: RandomGen g => g -> [T a] #

(Ord a, C a) => C (T a) Source # 
Instance details

Defined in Number.Ratio

Methods

compare :: T a -> T a -> Ordering Source #

C a => C (T a) Source # 
Instance details

Defined in Number.Ratio

Methods

zero :: T a Source #

(+) :: T a -> T a -> T a Source #

(-) :: T a -> T a -> T a Source #

negate :: T a -> T a Source #

(C a, C a) => C (T a) Source # 
Instance details

Defined in Number.Ratio

Methods

isZero :: T a -> Bool Source #

C a => C (T a) Source # 
Instance details

Defined in Number.Ratio

Methods

(*) :: T a -> T a -> T a Source #

one :: T a Source #

fromInteger :: Integer -> T a Source #

(^) :: T a -> Integer -> T a Source #

(C a, C a) => C (T a) Source # 
Instance details

Defined in Number.Ratio

Methods

abs :: T a -> T a Source #

signum :: T a -> T a Source #

C a => C (T a) Source # 
Instance details

Defined in Algebra.Field

Methods

(/) :: T a -> T a -> T a Source #

recip :: T a -> T a Source #

fromRational' :: Rational -> T a Source #

(^-) :: T a -> Integer -> T a Source #

(C a, C a) => C (T a) Source # 
Instance details

Defined in Algebra.ToInteger

Methods

toRational :: T a -> Rational Source #

(C a, C a) => C (T a) Source # 
Instance details

Defined in Algebra.RealRing

Methods

splitFraction :: C b => T a -> (b, T a) Source #

fraction :: T a -> T a Source #

ceiling :: C b => T a -> b Source #

floor :: C b => T a -> b Source #

truncate :: C b => T a -> b Source #

round :: C b => T a -> b Source #

(C a, C a) => C (T a) Source # 
Instance details

Defined in Algebra.RealField

(Ord a, C a) => C (T a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

up :: T a -> T a -> T a Source #

dn :: T a -> T a -> T a Source #

C a => C (T a) (T a) Source # 
Instance details

Defined in Algebra.Module

Methods

(*>) :: T a -> T a -> T a Source #

C a => C (T a) (T a) Source # 
Instance details

Defined in Algebra.VectorSpace

C a => C (T a) (T a) Source # 
Instance details

Defined in Algebra.ModuleBasis

Methods

basis :: T a -> [T a] Source #

flatten :: T a -> [T a] Source #

dimension :: T a -> T a -> Int Source #

(C a, C a) => C (T a) (T a) Source # 
Instance details

Defined in Algebra.NormedSpace.Sum

Methods

norm :: T a -> T a Source #

(C a, C a, C a) => C (T a) (T a) Source # 
Instance details

Defined in Algebra.NormedSpace.Maximum

Methods

norm :: T a -> T a Source #

(C a, C a) => Sqr (T a) (T a) Source # 
Instance details

Defined in Algebra.NormedSpace.Euclidean

Methods

normSqr :: T a -> T a Source #

(%) :: C a => a -> a -> T a infixl 7 Source #

fromValue :: C a => a -> T a Source #

recip :: (C a, C a) => T a -> T a Source #

scale :: C a => a -> T a -> T a Source #

split :: C a => T a -> (a, T a) Source #

similar to splitFraction

showsPrecAuto :: (Eq a, C a, Show a) => Int -> T a -> String -> String Source #

This is an alternative show method that is more user-friendly but also potentially more ambigious.

toRational98 :: Integral a => T a -> Ratio a Source #

Necessary when mixing NumericPrelude.Numeric Rationals with Prelude98 Rationals