Google

>
 Haskell Core Libraries (base package)ParentContentsIndex
GHC.Float
Portability non-portable (GHC Extensions)
Stability internal
Maintainer cvs-ghc@haskell.org
Description
The types Float and Double, and the classes Floating and RealFloat.
Synopsis
class (Fractional a) => Floating a where
pi :: a
exp :: a -> a
log :: a -> a
sqrt :: a -> a
(**) :: a -> a -> a
logBase :: a -> a -> a
sin :: a -> a
cos :: a -> a
tan :: a -> a
asin :: a -> a
acos :: a -> a
atan :: a -> a
sinh :: a -> a
cosh :: a -> a
tanh :: a -> a
asinh :: a -> a
acosh :: a -> a
atanh :: a -> a
class (RealFrac a, Floating a) => RealFloat a where
floatRadix :: a -> Integer
floatDigits :: a -> Int
floatRange :: a -> (Int, Int)
decodeFloat :: a -> (Integer, Int)
encodeFloat :: Integer -> Int -> a
exponent :: a -> Int
significand :: a -> a
scaleFloat :: Int -> a -> a
isNaN :: a -> Bool
isInfinite :: a -> Bool
isDenormalized :: a -> Bool
isNegativeZero :: a -> Bool
isIEEE :: a -> Bool
atan2 :: a -> a -> a
data Float = F# Float#
data Double = D# Double#
showFloat :: (RealFloat a) => a -> ShowS
data FFFormat
= FFExponent
| FFFixed
| FFGeneric
formatRealFloat :: (RealFloat a) => FFFormat -> Maybe Int -> a -> String
roundTo :: Int -> Int -> [Int] -> (Int, [Int])
floatToDigits :: (RealFloat a) => Integer -> a -> ([Int], Int)
fromRat :: (RealFloat a) => Rational -> a
fromRat' :: (RealFloat a) => Rational -> a
scaleRat :: Rational -> Int -> Rational -> Rational -> Int -> Rational -> (Rational, Int)
minExpt :: Int
maxExpt :: Int
expt :: Integer -> Int -> Integer
expts :: Array Int Integer
integerLogBase :: Integer -> Integer -> Int
plusFloat :: Float -> Float -> Float
minusFloat :: Float -> Float -> Float
timesFloat :: Float -> Float -> Float
divideFloat :: Float -> Float -> Float
negateFloat :: Float -> Float
gtFloat :: Float -> Float -> Bool
geFloat :: Float -> Float -> Bool
eqFloat :: Float -> Float -> Bool
neFloat :: Float -> Float -> Bool
ltFloat :: Float -> Float -> Bool
leFloat :: Float -> Float -> Bool
float2Int :: Float -> Int
int2Float :: Int -> Float
expFloat :: Float -> Float
logFloat :: Float -> Float
sqrtFloat :: Float -> Float
sinFloat :: Float -> Float
cosFloat :: Float -> Float
tanFloat :: Float -> Float
asinFloat :: Float -> Float
acosFloat :: Float -> Float
atanFloat :: Float -> Float
sinhFloat :: Float -> Float
coshFloat :: Float -> Float
tanhFloat :: Float -> Float
powerFloat :: Float -> Float -> Float
plusDouble :: Double -> Double -> Double
minusDouble :: Double -> Double -> Double
timesDouble :: Double -> Double -> Double
divideDouble :: Double -> Double -> Double
negateDouble :: Double -> Double
gtDouble :: Double -> Double -> Bool
geDouble :: Double -> Double -> Bool
eqDouble :: Double -> Double -> Bool
neDouble :: Double -> Double -> Bool
leDouble :: Double -> Double -> Bool
ltDouble :: Double -> Double -> Bool
double2Int :: Double -> Int
int2Double :: Int -> Double
double2Float :: Double -> Float
float2Double :: Float -> Double
expDouble :: Double -> Double
logDouble :: Double -> Double
sqrtDouble :: Double -> Double
sinDouble :: Double -> Double
cosDouble :: Double -> Double
tanDouble :: Double -> Double
asinDouble :: Double -> Double
acosDouble :: Double -> Double
atanDouble :: Double -> Double
sinhDouble :: Double -> Double
coshDouble :: Double -> Double
tanhDouble :: Double -> Double
powerDouble :: Double -> Double -> Double
encodeFloat# :: Int# -> ByteArray# -> Int -> Float
int_encodeFloat# :: Int# -> Int -> Float
isFloatNaN :: Float -> Int
isFloatInfinite :: Float -> Int
isFloatDenormalized :: Float -> Int
isFloatNegativeZero :: Float -> Int
encodeDouble# :: Int# -> ByteArray# -> Int -> Double
int_encodeDouble# :: Int# -> Int -> Double
isDoubleNaN :: Double -> Int
isDoubleInfinite :: Double -> Int
isDoubleDenormalized :: Double -> Int
isDoubleNegativeZero :: Double -> Int
Documentation
class (Fractional a) => Floating a where
Methods
pi :: a
exp :: a -> a
log :: a -> a
sqrt :: a -> a
(**) :: a -> a -> a
logBase :: a -> a -> a
sin :: a -> a
cos :: a -> a
tan :: a -> a
asin :: a -> a
acos :: a -> a
atan :: a -> a
sinh :: a -> a
cosh :: a -> a
tanh :: a -> a
asinh :: a -> a
acosh :: a -> a
atanh :: a -> a
Instances
(RealFloat a) => Floating (Complex a)
Floating Float
Floating Double
class (RealFrac a, Floating a) => RealFloat a where
Methods
floatRadix :: a -> Integer
floatDigits :: a -> Int
floatRange :: a -> (Int, Int)
decodeFloat :: a -> (Integer, Int)
encodeFloat :: Integer -> Int -> a
exponent :: a -> Int
significand :: a -> a
scaleFloat :: Int -> a -> a
isNaN :: a -> Bool
isInfinite :: a -> Bool
isDenormalized :: a -> Bool
isNegativeZero :: a -> Bool
isIEEE :: a -> Bool
atan2 :: a -> a -> a
Instances
RealFloat Float
RealFloat Double
data Float
Single-precision floating point numbers.
Constructors
F# Float#
Instances
IArray UArray Float
(Ix ix) => Eq (UArray ix Float)
(Ix ix) => Ord (UArray ix Float)
(Ix ix, Show ix) => Show (UArray ix Float)
MArray (STUArray s) Float (ST s)
(Ix ix, Show ix) => Show (DiffUArray ix Float)
IArray (IOToDiffArray IOUArray) Float
MArray IOUArray Float IO
Typeable Float
Arbitrary Float
CCallable Float
CReturnable Float
Eq Float
Ord Float
Num Float
Real Float
Fractional Float
RealFrac Float
Floating Float
RealFloat Float
Show Float
Enum Float
Read Float
Storable Float
Random Float
data Double
Double-precision floating point numbers.
Constructors
D# Double#
Instances
IArray UArray Double
(Ix ix) => Eq (UArray ix Double)
(Ix ix) => Ord (UArray ix Double)
(Ix ix, Show ix) => Show (UArray ix Double)
MArray (STUArray s) Double (ST s)
(Ix ix, Show ix) => Show (DiffUArray ix Double)
IArray (IOToDiffArray IOUArray) Double
MArray IOUArray Double IO
Typeable Double
Arbitrary Double
CCallable Double
CReturnable Double
Eq Double
Ord Double
Num Double
Real Double
Fractional Double
Floating Double
RealFrac Double
RealFloat Double
Show Double
Enum Double
Read Double
Storable Double
Random Double
showFloat :: (RealFloat a) => a -> ShowS
data FFFormat
Constructors
FFExponent
FFFixed
FFGeneric
formatRealFloat :: (RealFloat a) => FFFormat -> Maybe Int -> a -> String
roundTo :: Int -> Int -> [Int] -> (Int, [Int])
floatToDigits :: (RealFloat a) => Integer -> a -> ([Int], Int)
fromRat :: (RealFloat a) => Rational -> a
fromRat' :: (RealFloat a) => Rational -> a
scaleRat :: Rational -> Int -> Rational -> Rational -> Int -> Rational -> (Rational, Int)
minExpt :: Int
maxExpt :: Int
expt :: Integer -> Int -> Integer
expts :: Array Int Integer
integerLogBase :: Integer -> Integer -> Int
plusFloat :: Float -> Float -> Float
minusFloat :: Float -> Float -> Float
timesFloat :: Float -> Float -> Float
divideFloat :: Float -> Float -> Float
negateFloat :: Float -> Float
gtFloat :: Float -> Float -> Bool
geFloat :: Float -> Float -> Bool
eqFloat :: Float -> Float -> Bool
neFloat :: Float -> Float -> Bool
ltFloat :: Float -> Float -> Bool
leFloat :: Float -> Float -> Bool
float2Int :: Float -> Int
int2Float :: Int -> Float
expFloat :: Float -> Float
logFloat :: Float -> Float
sqrtFloat :: Float -> Float
sinFloat :: Float -> Float
cosFloat :: Float -> Float
tanFloat :: Float -> Float
asinFloat :: Float -> Float
acosFloat :: Float -> Float
atanFloat :: Float -> Float
sinhFloat :: Float -> Float
coshFloat :: Float -> Float
tanhFloat :: Float -> Float
powerFloat :: Float -> Float -> Float
plusDouble :: Double -> Double -> Double
minusDouble :: Double -> Double -> Double
timesDouble :: Double -> Double -> Double
divideDouble :: Double -> Double -> Double
negateDouble :: Double -> Double
gtDouble :: Double -> Double -> Bool
geDouble :: Double -> Double -> Bool
eqDouble :: Double -> Double -> Bool
neDouble :: Double -> Double -> Bool
leDouble :: Double -> Double -> Bool
ltDouble :: Double -> Double -> Bool
double2Int :: Double -> Int
int2Double :: Int -> Double
double2Float :: Double -> Float
float2Double :: Float -> Double
expDouble :: Double -> Double
logDouble :: Double -> Double
sqrtDouble :: Double -> Double
sinDouble :: Double -> Double
cosDouble :: Double -> Double
tanDouble :: Double -> Double
asinDouble :: Double -> Double
acosDouble :: Double -> Double
atanDouble :: Double -> Double
sinhDouble :: Double -> Double
coshDouble :: Double -> Double
tanhDouble :: Double -> Double
powerDouble :: Double -> Double -> Double
encodeFloat# :: Int# -> ByteArray# -> Int -> Float
int_encodeFloat# :: Int# -> Int -> Float
isFloatNaN :: Float -> Int
isFloatInfinite :: Float -> Int
isFloatDenormalized :: Float -> Int
isFloatNegativeZero :: Float -> Int
encodeDouble# :: Int# -> ByteArray# -> Int -> Double
int_encodeDouble# :: Int# -> Int -> Double
isDoubleNaN :: Double -> Int
isDoubleInfinite :: Double -> Int
isDoubleDenormalized :: Double -> Int
isDoubleNegativeZero :: Double -> Int
Produced by Haddock version 0.4