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

Safe HaskellNone
LanguageHaskell98

NumericPrelude.Numeric

Synopsis

Documentation

(+), (-) :: C a => a -> a -> a infixl 6 +, - #

add and subtract elements

(+), (-) :: C a => a -> a -> a infixl 6 +, - #

add and subtract elements

negate :: C a => a -> a #

inverse with respect to +

zero :: C a => a #

zero element of the vector space

subtract :: C a => a -> a -> a #

subtract is (-) with swapped operand order. This is the operand order which will be needed in most cases of partial application.

sum :: C a => [a] -> a #

Sum up all elements of a list. An empty list yields zero.

This function is inappropriate for number types like Peano. Maybe we should make sum a method of Additive. This would also make lengthLeft and lengthRight superfluous.

sum1 :: C a => [a] -> a #

Sum up all elements of a non-empty list. This avoids including a zero which is useful for types where no universal zero is available. ToDo: Should have NonEmpty type.

isZero :: C a => a -> Bool #

(*) :: C a => a -> a -> a infixl 7 #

one :: C a => a #

fromInteger :: C a => Integer -> a #

(^) :: C a => a -> Integer -> a infixr 8 #

The exponent has fixed type Integer in order to avoid an arbitrarily limitted range of exponents, but to reduce the need for the compiler to guess the type (default type). In practice the exponent is most oftenly fixed, and is most oftenly 2. Fixed exponents can be optimized away and thus the expensive computation of Integers doesn't matter. The previous solution used a C constrained type and the exponent was converted to Integer before computation. So the current solution is not less efficient.

A variant of ^ with more flexibility is provided by ringPower.

ringPower :: (C a, C b) => b -> a -> a #

A prefix function of '(Algebra.Ring.^)' with a parameter order that fits the needs of partial application and function composition. It has generalised exponent.

See: Argument order of expNat on http://www.haskell.org/pipermail/haskell-cafe/2006-September/018022.html

sqr :: C a => a -> a #

product :: C a => [a] -> a #

product1 :: C a => [a] -> a #

div, mod :: C a => a -> a -> a infixl 7 `div`, `mod` #

div, mod :: C a => a -> a -> a infixl 7 `div`, `mod` #

divMod :: C a => a -> a -> (a, a) #

divides :: (C a, C a) => a -> a -> Bool #

even :: (C a, C a) => a -> Bool #

odd :: (C a, C a) => a -> Bool #

(/) :: C a => a -> a -> a infixl 7 #

recip :: C a => a -> a #

fromRational' :: C a => Rational -> a #

(^-) :: C a => a -> Integer -> a infixr 8 #

fieldPower :: (C a, C b) => b -> a -> a #

A prefix function of '(Algebra.Field.^-)'. It has a generalised exponent.

fromRational :: C a => Rational -> a #

Needed to work around shortcomings in GHC.

(^/) :: C a => a -> Rational -> a infixr 8 #

sqrt :: C a => a -> a #

pi :: C a => a #

exp, log :: C a => a -> a #

exp, log :: C a => a -> a #

logBase, (**) :: C a => a -> a -> a infixr 8 #

logBase, (**) :: C a => a -> a -> a infixr 8 #

(^?) :: C a => a -> a -> a infixr 8 #

sin, cos, tan :: C a => a -> a #

sin, cos, tan :: C a => a -> a #

sin, cos, tan :: C a => a -> a #

asin, acos, atan :: C a => a -> a #

asin, acos, atan :: C a => a -> a #

asin, acos, atan :: C a => a -> a #

sinh, cosh, tanh :: C a => a -> a #

sinh, cosh, tanh :: C a => a -> a #

sinh, cosh, tanh :: C a => a -> a #

asinh, acosh, atanh :: C a => a -> a #

asinh, acosh, atanh :: C a => a -> a #

asinh, acosh, atanh :: C a => a -> a #

abs :: C a => a -> a #

signum :: C a => a -> a #

quot, rem :: C a => a -> a -> a infixl 7 `quot`, `rem` #

quot, rem :: C a => a -> a -> a infixl 7 `quot`, `rem` #

quotRem :: C a => a -> a -> (a, a) #

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

fraction :: C a => a -> a #

truncate :: (C a, C b) => a -> b #

round :: (C a, C b) => a -> b #

ceiling, floor :: (C a, C b) => a -> b #

ceiling, floor :: (C a, C b) => a -> b #

approxRational :: (C a, C a) => a -> a -> Rational #

TODO: Should be moved to a continued fraction module.

atan2 :: C a => a -> a -> a #

toRational :: C a => a -> Rational #

Lossless conversion from any representation of a rational to Rational

toInteger :: C a => a -> Integer #

fromIntegral :: (C a, C b) => a -> b #

isUnit :: C a => a -> Bool #

stdAssociate, stdUnit, stdUnitInv :: C a => a -> a #

stdAssociate, stdUnit, stdUnitInv :: C a => a -> a #

stdAssociate, stdUnit, stdUnitInv :: C a => a -> a #

extendedGCD :: C a => a -> a -> (a, (a, a)) #

Compute the greatest common divisor and solve a respective Diophantine equation.

  (g,(a,b)) = extendedGCD x y ==>
       g==a*x+b*y   &&  g == gcd x y

TODO: This method is not appropriate for the PID class, because there are rings like the one of the multivariate polynomials, where for all x and y greatest common divisors of x and y exist, but they cannot be represented as a linear combination of x and y. TODO: The definition of extendedGCD does not return the canonical associate.

gcd :: C a => a -> a -> a #

The Greatest Common Divisor is defined by:

  gcd x y == gcd y x
  divides z x && divides z y ==> divides z (gcd x y)   (specification)
  divides (gcd x y) x

lcm :: C a => a -> a -> a #

Least common multiple

euclid :: (C a, C a) => (a -> a -> a) -> a -> a -> a #

extendedEuclid :: (C a, C a) => (a -> a -> (a, a)) -> a -> a -> (a, (a, a)) #

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

numerator :: T a -> a #

denominator :: T a -> a #

data Integer :: * #

Invariant: Jn# and Jp# are used iff value doesn't fit in S#

Useful properties resulting from the invariants:

Instances

Enum Integer

Since: 2.1

Eq Integer 

Methods

(==) :: Integer -> Integer -> Bool #

(/=) :: Integer -> Integer -> Bool #

Integral Integer

Since: 2.0.1

Num Integer

Since: 2.1

Ord Integer 
Read Integer

Since: 2.1

Real Integer

Since: 2.0.1

Show Integer

Since: 2.1

Ix Integer

Since: 2.1

Lift Integer 

Methods

lift :: Integer -> Q Exp #

Arbitrary Integer 
CoArbitrary Integer 

Methods

coarbitrary :: Integer -> Gen b -> Gen b #

NFData Integer 

Methods

rnf :: Integer -> () #

Random Integer 

Methods

randomR :: RandomGen g => (Integer, Integer) -> g -> (Integer, g) #

random :: RandomGen g => g -> (Integer, g) #

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

randoms :: RandomGen g => g -> [Integer] #

randomRIO :: (Integer, Integer) -> IO Integer #

randomIO :: IO Integer #

C Integer # 

Methods

compare :: Integer -> Integer -> Ordering #

C Integer # 
C Integer # 

Methods

isZero :: Integer -> Bool #

C Integer # 
C Integer # 
C Integer # 
C Integer # 
C Integer # 
C Integer # 
C Integer # 
C Integer # 

Methods

toInteger :: Integer -> Integer #

C Integer # 

Methods

splitFraction :: C b => Integer -> (b, Integer) #

fraction :: Integer -> Integer #

ceiling :: C b => Integer -> b #

floor :: C b => Integer -> b #

truncate :: C b => Integer -> b #

round :: C b => Integer -> b #

C Integer # 

Methods

up :: Integer -> Integer -> Integer #

dn :: Integer -> Integer -> Integer #

C Integer Integer # 

Methods

(*>) :: Integer -> Integer -> Integer #

C Integer Integer # 
C Integer Integer # 

Methods

norm :: Integer -> Integer #

C Integer Integer # 

Methods

norm :: Integer -> Integer #

C Integer Integer # 

Methods

norm :: Integer -> Integer #

Sqr Integer Integer # 

Methods

normSqr :: Integer -> Integer #

C a => C Integer (T a) # 

Methods

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

data Int :: * #

A fixed-precision integer type with at least the range [-2^29 .. 2^29-1]. The exact range for a given implementation can be determined by using minBound and maxBound from the Bounded class.

Instances

Bounded Int

Since: 2.1

Methods

minBound :: Int #

maxBound :: Int #

Enum Int

Since: 2.1

Methods

succ :: Int -> Int #

pred :: Int -> Int #

toEnum :: Int -> Int #

fromEnum :: Int -> Int #

enumFrom :: Int -> [Int] #

enumFromThen :: Int -> Int -> [Int] #

enumFromTo :: Int -> Int -> [Int] #

enumFromThenTo :: Int -> Int -> Int -> [Int] #

Eq Int 

Methods

(==) :: Int -> Int -> Bool #

(/=) :: Int -> Int -> Bool #

Integral Int

Since: 2.0.1

Methods

quot :: Int -> Int -> Int #

rem :: Int -> Int -> Int #

div :: Int -> Int -> Int #

mod :: Int -> Int -> Int #

quotRem :: Int -> Int -> (Int, Int) #

divMod :: Int -> Int -> (Int, Int) #

toInteger :: Int -> Integer #

Num Int

Since: 2.1

Methods

(+) :: Int -> Int -> Int #

(-) :: Int -> Int -> Int #

(*) :: Int -> Int -> Int #

negate :: Int -> Int #

abs :: Int -> Int #

signum :: Int -> Int #

fromInteger :: Integer -> Int #

Ord Int 

Methods

compare :: Int -> Int -> Ordering #

(<) :: Int -> Int -> Bool #

(<=) :: Int -> Int -> Bool #

(>) :: Int -> Int -> Bool #

(>=) :: Int -> Int -> Bool #

max :: Int -> Int -> Int #

min :: Int -> Int -> Int #

Read Int

Since: 2.1

Real Int

Since: 2.0.1

Methods

toRational :: Int -> Rational #

Show Int

Since: 2.1

Methods

showsPrec :: Int -> Int -> ShowS #

show :: Int -> String #

showList :: [Int] -> ShowS #

Ix Int

Since: 2.1

Methods

range :: (Int, Int) -> [Int] #

index :: (Int, Int) -> Int -> Int #

unsafeIndex :: (Int, Int) -> Int -> Int

inRange :: (Int, Int) -> Int -> Bool #

rangeSize :: (Int, Int) -> Int #

unsafeRangeSize :: (Int, Int) -> Int

Lift Int 

Methods

lift :: Int -> Q Exp #

Arbitrary Int 

Methods

arbitrary :: Gen Int #

shrink :: Int -> [Int] #

CoArbitrary Int 

Methods

coarbitrary :: Int -> Gen b -> Gen b #

Storable Int

Since: 2.1

Methods

sizeOf :: Int -> Int #

alignment :: Int -> Int #

peekElemOff :: Ptr Int -> Int -> IO Int #

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

peekByteOff :: Ptr b -> Int -> IO Int #

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

peek :: Ptr Int -> IO Int #

poke :: Ptr Int -> Int -> IO () #

NFData Int 

Methods

rnf :: Int -> () #

Random Int 

Methods

randomR :: RandomGen g => (Int, Int) -> g -> (Int, g) #

random :: RandomGen g => g -> (Int, g) #

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

randoms :: RandomGen g => g -> [Int] #

randomRIO :: (Int, Int) -> IO Int #

randomIO :: IO Int #

C Int # 

Methods

zero :: Int #

(+) :: Int -> Int -> Int #

(-) :: Int -> Int -> Int #

negate :: Int -> Int #

C Int # 

Methods

isZero :: Int -> Bool #

C Int # 

Methods

(*) :: Int -> Int -> Int #

one :: Int #

fromInteger :: Integer -> Int #

(^) :: Int -> Integer -> Int #

C Int # 

Methods

div :: Int -> Int -> Int #

mod :: Int -> Int -> Int #

divMod :: Int -> Int -> (Int, Int) #

C Int # 

Methods

isUnit :: Int -> Bool #

stdAssociate :: Int -> Int #

stdUnit :: Int -> Int #

stdUnitInv :: Int -> Int #

C Int # 

Methods

extendedGCD :: Int -> Int -> (Int, (Int, Int)) #

gcd :: Int -> Int -> Int #

lcm :: Int -> Int -> Int #

C Int # 

Methods

abs :: Int -> Int #

signum :: Int -> Int #

C Int # 

Methods

toRational :: Int -> Rational #

C Int # 

Methods

quot :: Int -> Int -> Int #

rem :: Int -> Int -> Int #

quotRem :: Int -> Int -> (Int, Int) #

C Int # 

Methods

toInteger :: Int -> Integer #

C Int # 

Methods

splitFraction :: C b => Int -> (b, Int) #

fraction :: Int -> Int #

ceiling :: C b => Int -> b #

floor :: C b => Int -> b #

truncate :: C b => Int -> b #

round :: C b => Int -> b #

C Int Int # 

Methods

(*>) :: Int -> Int -> Int #

C Int Int # 

Methods

basis :: Int -> [Int] #

flatten :: Int -> [Int] #

dimension :: Int -> Int -> Int #

C Int Int # 

Methods

norm :: Int -> Int #

C Int Int # 

Methods

norm :: Int -> Int #

C Int Int # 

Methods

norm :: Int -> Int #

Sqr Int Int # 

Methods

normSqr :: Int -> Int #

Generic1 k (URec k Int) 

Associated Types

type Rep1 (URec k Int) (f :: URec k Int -> *) :: k -> * #

Methods

from1 :: f a -> Rep1 (URec k Int) f a #

to1 :: Rep1 (URec k Int) f a -> f a #

Functor (URec * Int) 

Methods

fmap :: (a -> b) -> URec * Int a -> URec * Int b #

(<$) :: a -> URec * Int b -> URec * Int a #

Foldable (URec * Int) 

Methods

fold :: Monoid m => URec * Int m -> m #

foldMap :: Monoid m => (a -> m) -> URec * Int a -> m #

foldr :: (a -> b -> b) -> b -> URec * Int a -> b #

foldr' :: (a -> b -> b) -> b -> URec * Int a -> b #

foldl :: (b -> a -> b) -> b -> URec * Int a -> b #

foldl' :: (b -> a -> b) -> b -> URec * Int a -> b #

foldr1 :: (a -> a -> a) -> URec * Int a -> a #

foldl1 :: (a -> a -> a) -> URec * Int a -> a #

toList :: URec * Int a -> [a] #

null :: URec * Int a -> Bool #

length :: URec * Int a -> Int #

elem :: Eq a => a -> URec * Int a -> Bool #

maximum :: Ord a => URec * Int a -> a #

minimum :: Ord a => URec * Int a -> a #

sum :: Num a => URec * Int a -> a #

product :: Num a => URec * Int a -> a #

Traversable (URec * Int) 

Methods

traverse :: Applicative f => (a -> f b) -> URec * Int a -> f (URec * Int b) #

sequenceA :: Applicative f => URec * Int (f a) -> f (URec * Int a) #

mapM :: Monad m => (a -> m b) -> URec * Int a -> m (URec * Int b) #

sequence :: Monad m => URec * Int (m a) -> m (URec * Int a) #

Eq (URec k Int p) 

Methods

(==) :: URec k Int p -> URec k Int p -> Bool #

(/=) :: URec k Int p -> URec k Int p -> Bool #

Ord (URec k Int p) 

Methods

compare :: URec k Int p -> URec k Int p -> Ordering #

(<) :: URec k Int p -> URec k Int p -> Bool #

(<=) :: URec k Int p -> URec k Int p -> Bool #

(>) :: URec k Int p -> URec k Int p -> Bool #

(>=) :: URec k Int p -> URec k Int p -> Bool #

max :: URec k Int p -> URec k Int p -> URec k Int p #

min :: URec k Int p -> URec k Int p -> URec k Int p #

Show (URec k Int p) 

Methods

showsPrec :: Int -> URec k Int p -> ShowS #

show :: URec k Int p -> String #

showList :: [URec k Int p] -> ShowS #

Generic (URec k Int p) 

Associated Types

type Rep (URec k Int p) :: * -> * #

Methods

from :: URec k Int p -> Rep (URec k Int p) x #

to :: Rep (URec k Int p) x -> URec k Int p #

data URec k Int

Used for marking occurrences of Int#

Since: 4.9.0.0

data URec k Int = UInt {}
type Rep1 k (URec k Int) 
type Rep1 k (URec k Int) = D1 k (MetaData "URec" "GHC.Generics" "base" False) (C1 k (MetaCons "UInt" PrefixI True) (S1 k (MetaSel (Just Symbol "uInt#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UInt k)))
type Rep (URec k Int p) 
type Rep (URec k Int p) = D1 * (MetaData "URec" "GHC.Generics" "base" False) (C1 * (MetaCons "UInt" PrefixI True) (S1 * (MetaSel (Just Symbol "uInt#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UInt *)))

data Float :: * #

Single-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE single-precision type.

Instances

Eq Float 

Methods

(==) :: Float -> Float -> Bool #

(/=) :: Float -> Float -> Bool #

Floating Float

Since: 2.1

Ord Float 

Methods

compare :: Float -> Float -> Ordering #

(<) :: Float -> Float -> Bool #

(<=) :: Float -> Float -> Bool #

(>) :: Float -> Float -> Bool #

(>=) :: Float -> Float -> Bool #

max :: Float -> Float -> Float #

min :: Float -> Float -> Float #

Read Float

Since: 2.1

RealFloat Float

Since: 2.1

Lift Float 

Methods

lift :: Float -> Q Exp #

Arbitrary Float 

Methods

arbitrary :: Gen Float #

shrink :: Float -> [Float] #

CoArbitrary Float 

Methods

coarbitrary :: Float -> Gen b -> Gen b #

Storable Float

Since: 2.1

Methods

sizeOf :: Float -> Int #

alignment :: Float -> Int #

peekElemOff :: Ptr Float -> Int -> IO Float #

pokeElemOff :: Ptr Float -> Int -> Float -> IO () #

peekByteOff :: Ptr b -> Int -> IO Float #

pokeByteOff :: Ptr b -> Int -> Float -> IO () #

peek :: Ptr Float -> IO Float #

poke :: Ptr Float -> Float -> IO () #

NFData Float 

Methods

rnf :: Float -> () #

Random Float 

Methods

randomR :: RandomGen g => (Float, Float) -> g -> (Float, g) #

random :: RandomGen g => g -> (Float, g) #

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

randoms :: RandomGen g => g -> [Float] #

randomRIO :: (Float, Float) -> IO Float #

randomIO :: IO Float #

C Float # 

Methods

zero :: Float #

(+) :: Float -> Float -> Float #

(-) :: Float -> Float -> Float #

negate :: Float -> Float #

C Float # 

Methods

isZero :: Float -> Bool #

C Float # 
C Float # 

Methods

abs :: Float -> Float #

signum :: Float -> Float #

C Float # 
C Float # 

Methods

toRational :: Float -> Rational #

C Float # 

Methods

sqrt :: Float -> Float #

root :: Integer -> Float -> Float #

(^/) :: Float -> Rational -> Float #

C Float # 
C Float # 

Methods

splitFraction :: C b => Float -> (b, Float) #

fraction :: Float -> Float #

ceiling :: C b => Float -> b #

floor :: C b => Float -> b #

truncate :: C b => Float -> b #

round :: C b => Float -> b #

C Float # 
C Float # 

Methods

atan2 :: Float -> Float -> Float #

C Float # 
Power Float # 

Methods

power :: Rational -> T Float -> T Float #

C Float Float # 

Methods

(*>) :: Float -> Float -> Float #

C Float Float # 
C Float Float # 

Methods

basis :: Float -> [Float] #

flatten :: Float -> [Float] #

dimension :: Float -> Float -> Int #

C Float Float # 
C Float Float # 

Methods

norm :: Float -> Float #

C Float Float # 

Methods

norm :: Float -> Float #

C Float Float # 

Methods

norm :: Float -> Float #

Sqr Float Float # 

Methods

normSqr :: Float -> Float #

Generic1 k (URec k Float) 

Associated Types

type Rep1 (URec k Float) (f :: URec k Float -> *) :: k -> * #

Methods

from1 :: f a -> Rep1 (URec k Float) f a #

to1 :: Rep1 (URec k Float) f a -> f a #

Functor (URec * Float) 

Methods

fmap :: (a -> b) -> URec * Float a -> URec * Float b #

(<$) :: a -> URec * Float b -> URec * Float a #

Foldable (URec * Float) 

Methods

fold :: Monoid m => URec * Float m -> m #

foldMap :: Monoid m => (a -> m) -> URec * Float a -> m #

foldr :: (a -> b -> b) -> b -> URec * Float a -> b #

foldr' :: (a -> b -> b) -> b -> URec * Float a -> b #

foldl :: (b -> a -> b) -> b -> URec * Float a -> b #

foldl' :: (b -> a -> b) -> b -> URec * Float a -> b #

foldr1 :: (a -> a -> a) -> URec * Float a -> a #

foldl1 :: (a -> a -> a) -> URec * Float a -> a #

toList :: URec * Float a -> [a] #

null :: URec * Float a -> Bool #

length :: URec * Float a -> Int #

elem :: Eq a => a -> URec * Float a -> Bool #

maximum :: Ord a => URec * Float a -> a #

minimum :: Ord a => URec * Float a -> a #

sum :: Num a => URec * Float a -> a #

product :: Num a => URec * Float a -> a #

Traversable (URec * Float) 

Methods

traverse :: Applicative f => (a -> f b) -> URec * Float a -> f (URec * Float b) #

sequenceA :: Applicative f => URec * Float (f a) -> f (URec * Float a) #

mapM :: Monad m => (a -> m b) -> URec * Float a -> m (URec * Float b) #

sequence :: Monad m => URec * Float (m a) -> m (URec * Float a) #

Eq (URec k Float p) 

Methods

(==) :: URec k Float p -> URec k Float p -> Bool #

(/=) :: URec k Float p -> URec k Float p -> Bool #

Ord (URec k Float p) 

Methods

compare :: URec k Float p -> URec k Float p -> Ordering #

(<) :: URec k Float p -> URec k Float p -> Bool #

(<=) :: URec k Float p -> URec k Float p -> Bool #

(>) :: URec k Float p -> URec k Float p -> Bool #

(>=) :: URec k Float p -> URec k Float p -> Bool #

max :: URec k Float p -> URec k Float p -> URec k Float p #

min :: URec k Float p -> URec k Float p -> URec k Float p #

Show (URec k Float p) 

Methods

showsPrec :: Int -> URec k Float p -> ShowS #

show :: URec k Float p -> String #

showList :: [URec k Float p] -> ShowS #

Generic (URec k Float p) 

Associated Types

type Rep (URec k Float p) :: * -> * #

Methods

from :: URec k Float p -> Rep (URec k Float p) x #

to :: Rep (URec k Float p) x -> URec k Float p #

data URec k Float

Used for marking occurrences of Float#

Since: 4.9.0.0

type Rep1 k (URec k Float) 
type Rep1 k (URec k Float) = D1 k (MetaData "URec" "GHC.Generics" "base" False) (C1 k (MetaCons "UFloat" PrefixI True) (S1 k (MetaSel (Just Symbol "uFloat#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UFloat k)))
type Rep (URec k Float p) 
type Rep (URec k Float p) = D1 * (MetaData "URec" "GHC.Generics" "base" False) (C1 * (MetaCons "UFloat" PrefixI True) (S1 * (MetaSel (Just Symbol "uFloat#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UFloat *)))

data Double :: * #

Double-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE double-precision type.

Instances

Eq Double 

Methods

(==) :: Double -> Double -> Bool #

(/=) :: Double -> Double -> Bool #

Floating Double

Since: 2.1

Ord Double 
Read Double

Since: 2.1

RealFloat Double

Since: 2.1

Lift Double 

Methods

lift :: Double -> Q Exp #

Arbitrary Double 
CoArbitrary Double 

Methods

coarbitrary :: Double -> Gen b -> Gen b #

Storable Double

Since: 2.1

NFData Double 

Methods

rnf :: Double -> () #

Random Double 

Methods

randomR :: RandomGen g => (Double, Double) -> g -> (Double, g) #

random :: RandomGen g => g -> (Double, g) #

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

randoms :: RandomGen g => g -> [Double] #

randomRIO :: (Double, Double) -> IO Double #

randomIO :: IO Double #

C Double # 
C Double # 

Methods

isZero :: Double -> Bool #

C Double # 
C Double # 

Methods

abs :: Double -> Double #

signum :: Double -> Double #

C Double # 
C Double # 
C Double # 
C Double # 
C Double # 

Methods

splitFraction :: C b => Double -> (b, Double) #

fraction :: Double -> Double #

ceiling :: C b => Double -> b #

floor :: C b => Double -> b #

truncate :: C b => Double -> b #

round :: C b => Double -> b #

C Double # 
C Double # 

Methods

atan2 :: Double -> Double -> Double #

C Double # 
Power Double # 

Methods

power :: Rational -> T Double -> T Double #

C Double Double # 

Methods

(*>) :: Double -> Double -> Double #

C Double Double # 
C Double Double # 

Methods

basis :: Double -> [Double] #

flatten :: Double -> [Double] #

dimension :: Double -> Double -> Int #

C Double Double # 
C Double Double # 

Methods

norm :: Double -> Double #

C Double Double # 

Methods

norm :: Double -> Double #

C Double Double # 

Methods

norm :: Double -> Double #

Sqr Double Double # 

Methods

normSqr :: Double -> Double #

Generic1 k (URec k Double) 

Associated Types

type Rep1 (URec k Double) (f :: URec k Double -> *) :: k -> * #

Methods

from1 :: f a -> Rep1 (URec k Double) f a #

to1 :: Rep1 (URec k Double) f a -> f a #

Functor (URec * Double) 

Methods

fmap :: (a -> b) -> URec * Double a -> URec * Double b #

(<$) :: a -> URec * Double b -> URec * Double a #

Foldable (URec * Double) 

Methods

fold :: Monoid m => URec * Double m -> m #

foldMap :: Monoid m => (a -> m) -> URec * Double a -> m #

foldr :: (a -> b -> b) -> b -> URec * Double a -> b #

foldr' :: (a -> b -> b) -> b -> URec * Double a -> b #

foldl :: (b -> a -> b) -> b -> URec * Double a -> b #

foldl' :: (b -> a -> b) -> b -> URec * Double a -> b #

foldr1 :: (a -> a -> a) -> URec * Double a -> a #

foldl1 :: (a -> a -> a) -> URec * Double a -> a #

toList :: URec * Double a -> [a] #

null :: URec * Double a -> Bool #

length :: URec * Double a -> Int #

elem :: Eq a => a -> URec * Double a -> Bool #

maximum :: Ord a => URec * Double a -> a #

minimum :: Ord a => URec * Double a -> a #

sum :: Num a => URec * Double a -> a #

product :: Num a => URec * Double a -> a #

Traversable (URec * Double) 

Methods

traverse :: Applicative f => (a -> f b) -> URec * Double a -> f (URec * Double b) #

sequenceA :: Applicative f => URec * Double (f a) -> f (URec * Double a) #

mapM :: Monad m => (a -> m b) -> URec * Double a -> m (URec * Double b) #

sequence :: Monad m => URec * Double (m a) -> m (URec * Double a) #

Eq (URec k Double p) 

Methods

(==) :: URec k Double p -> URec k Double p -> Bool #

(/=) :: URec k Double p -> URec k Double p -> Bool #

Ord (URec k Double p) 

Methods

compare :: URec k Double p -> URec k Double p -> Ordering #

(<) :: URec k Double p -> URec k Double p -> Bool #

(<=) :: URec k Double p -> URec k Double p -> Bool #

(>) :: URec k Double p -> URec k Double p -> Bool #

(>=) :: URec k Double p -> URec k Double p -> Bool #

max :: URec k Double p -> URec k Double p -> URec k Double p #

min :: URec k Double p -> URec k Double p -> URec k Double p #

Show (URec k Double p) 

Methods

showsPrec :: Int -> URec k Double p -> ShowS #

show :: URec k Double p -> String #

showList :: [URec k Double p] -> ShowS #

Generic (URec k Double p) 

Associated Types

type Rep (URec k Double p) :: * -> * #

Methods

from :: URec k Double p -> Rep (URec k Double p) x #

to :: Rep (URec k Double p) x -> URec k Double p #

data URec k Double

Used for marking occurrences of Double#

Since: 4.9.0.0

type Rep1 k (URec k Double) 
type Rep1 k (URec k Double) = D1 k (MetaData "URec" "GHC.Generics" "base" False) (C1 k (MetaCons "UDouble" PrefixI True) (S1 k (MetaSel (Just Symbol "uDouble#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UDouble k)))
type Rep (URec k Double p) 
type Rep (URec k Double p) = D1 * (MetaData "URec" "GHC.Generics" "base" False) (C1 * (MetaCons "UDouble" PrefixI True) (S1 * (MetaSel (Just Symbol "uDouble#") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (UDouble *)))

(*>) :: C a v => a -> v -> v infixr 7 #

scale a vector by a scalar