| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Float
Synopsis
- data Float
- eqf :: Float -> Float -> Bool
- minSubf :: Float
- minNormf :: Float
- maxOddf :: Float
- maxNormf :: Float
- epsilonf :: Float
- data Double
- eq :: Double -> Double -> Bool
- minSub :: Double
- minNorm :: Double
- maxOdd :: Double
- maxNorm :: Double
- epsilon :: Double
- cos :: Double -> Double
- sin :: Double -> Double
- tan :: Double -> Double
- acos :: Double -> Double
- asin :: Double -> Double
- atan :: Double -> Double
- atan2 :: Double -> Double -> Double
- cosh :: Double -> Double
- sinh :: Double -> Double
- tanh :: Double -> Double
- acosh :: Double -> Double
- asinh :: Double -> Double
- atanh :: Double -> Double
- exp :: Double -> Double
- frexp :: Double -> (Double, Int)
- ldexp :: Double -> Int -> Double
- log :: Double -> Double
- log10 :: Double -> Double
- modf :: Double -> (Double, Double)
- pow :: Double -> Double -> Double
- sqrt :: Double -> Double
- floor :: Double -> Double
- ceiling :: Double -> Double
- round :: Double -> Double
- truncate :: Double -> Double
- fabs :: Double -> Double
- fmod :: Double -> Double -> Double
- erf :: Double -> Double
- erfc :: Double -> Double
- hypot :: Double -> Double -> Double
- isinf :: Double -> Int
- finite :: Double -> Int
- j0 :: Double -> Double
- j1 :: Double -> Double
- y0 :: Double -> Double
- y1 :: Double -> Double
- yn :: Int -> Double -> Double
- lgamma :: Double -> Double
- cbrt :: Double -> Double
- logb :: Double -> Double
- nextafter :: Double -> Double -> Double
- remainder :: Double -> Double -> Double
- scalb :: Double -> Double -> Double
- significand :: Double -> Double
- copysign :: Double -> Double -> Double
- ilogb :: Double -> Int
- rint :: Double -> Double
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 | Note that due to the presence of
Also note that
|
| Floating Float | Since: base-2.1 |
| Ord Float | Note that due to the presence of
Also note that, due to the same,
|
| Read Float | Since: base-2.1 |
| RealFloat Float | Since: base-2.1 |
Defined in GHC.Float Methods floatRadix :: Float -> Integer # floatDigits :: Float -> Int # floatRange :: Float -> (Int, Int) # decodeFloat :: Float -> (Integer, Int) # encodeFloat :: Integer -> Int -> Float # significand :: Float -> Float # scaleFloat :: Int -> Float -> Float # isInfinite :: Float -> Bool # isDenormalized :: Float -> Bool # isNegativeZero :: Float -> Bool # | |
| Storable Float | Since: base-2.1 |
| Maximal Float Source # | |
| Minimal Float Source # | |
| Prd Float Source # | |
Defined in Data.Prd Methods (<=) :: Float -> Float -> Bool Source # (>=) :: Float -> Float -> Bool Source # (<) :: Float -> Float -> Bool Source # (>) :: Float -> Float -> Bool Source # (?~) :: Float -> Float -> Bool Source # (=~) :: Float -> Float -> Bool Source # (/~) :: Float -> Float -> Bool Source # (~~) :: Float -> Float -> Bool Source # | |
| Triple Rational Float Source # | |
| Triple Float (Extended Int8) Source # | |
| Triple Float (Extended Int16) Source # | |
| Connection Float (Nan Int32) Source # | |
Defined in Data.Connection | |
| Generic1 (URec Float :: k -> Type) | |
| Connection (Nan Int32) Float Source # | |
Defined in Data.Connection | |
| Functor (URec Float :: Type -> Type) | Since: base-4.9.0.0 |
| Foldable (URec Float :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Foldable 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 # | |
| Traversable (URec Float :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Traversable | |
| Eq (URec Float p) | |
| Ord (URec Float p) | |
Defined in GHC.Generics | |
| Show (URec Float p) | |
| Generic (URec Float p) | |
| data URec Float (p :: k) | Used for marking occurrences of Since: base-4.9.0.0 |
| type Rep1 (URec Float :: k -> Type) | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
| type Rep (URec Float p) | |
Defined in GHC.Generics | |
Maximum finite value.
maxNormf = shiftf (-1) maximal
>>>shiftf 1 maxNormfInfinity
Difference between 1 and the smallest representable value greater than 1.
epsilonf = shiftf 1 1 - 1
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 | Note that due to the presence of
Also note that
|
| Floating Double | Since: base-2.1 |
| Ord Double | Note that due to the presence of
Also note that, due to the same,
|
| Read Double | Since: base-2.1 |
| RealFloat Double | Since: base-2.1 |
Defined in GHC.Float Methods floatRadix :: Double -> Integer # floatDigits :: Double -> Int # floatRange :: Double -> (Int, Int) # decodeFloat :: Double -> (Integer, Int) # encodeFloat :: Integer -> Int -> Double # significand :: Double -> Double # scaleFloat :: Int -> Double -> Double # isInfinite :: Double -> Bool # isDenormalized :: Double -> Bool # isNegativeZero :: Double -> Bool # | |
| Storable Double | Since: base-2.1 |
| Maximal Double Source # | |
| Minimal Double Source # | |
| Prd Double Source # | |
Defined in Data.Prd Methods (<=) :: Double -> Double -> Bool Source # (>=) :: Double -> Double -> Bool Source # (<) :: Double -> Double -> Bool Source # (>) :: Double -> Double -> Bool Source # (?~) :: Double -> Double -> Bool Source # (=~) :: Double -> Double -> Bool Source # (/~) :: Double -> Double -> Bool Source # (~~) :: Double -> Double -> Bool Source # | |
| Triple Rational Double Source # | |
| Triple Double (Extended Int8) Source # | |
| Triple Double (Extended Int16) Source # | |
| Triple Double (Extended Int32) Source # | |
| Connection Double (Nan Int) Source # | |
Defined in Data.Connection | |
| Connection Double (Nan Int64) Source # | |
Defined in Data.Connection | |
| Generic1 (URec Double :: k -> Type) | |
| Connection (Nan Int) Double Source # | |
Defined in Data.Connection | |
| Connection (Nan Int64) Double Source # | |
Defined in Data.Connection | |
| Functor (URec Double :: Type -> Type) | Since: base-4.9.0.0 |
| Foldable (URec Double :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Foldable 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 # | |
| Traversable (URec Double :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Traversable | |
| Eq (URec Double p) | Since: base-4.9.0.0 |
| Ord (URec Double p) | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods compare :: URec Double p -> URec Double p -> Ordering # (<) :: URec Double p -> URec Double p -> Bool # (<=) :: URec Double p -> URec Double p -> Bool # (>) :: URec Double p -> URec Double p -> Bool # (>=) :: URec Double p -> URec Double p -> Bool # | |
| Show (URec Double p) | Since: base-4.9.0.0 |
| Generic (URec Double p) | |
| data URec Double (p :: k) | Used for marking occurrences of Since: base-4.9.0.0 |
| type Rep1 (URec Double :: k -> Type) | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
| type Rep (URec Double p) | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
Maximum finite value.
maxNorm = shift (-1) maximal
>>>shift 1 maxNormInfinity
Difference between 1 and the smallest representable value greater than 1.
epsilon = shift 1 1 - 1
cos :: Double -> Double Source #
The cos function computes the cosine of x (measured in radians). A large magnitude argument may yield a result with little or no significance. For a discussion of error due to roundoff, see math(3).
sin :: Double -> Double Source #
The sin function computes the sine of x (measured in radians). A large magnitude argument may yield a result with little or no significance. For a discussion of error due to roundoff, see math(3).
tan :: Double -> Double Source #
The tan function computes the tangent of x (measured in radians). A large magnitude argument may yield a result with little or no significance. For a discussion of error due to roundoff, see math(3).
acos :: Double -> Double Source #
The acos function computes the principal value of the arc cosine of x in the range [0, pi]
asin :: Double -> Double Source #
The asin function computes the principal value of the arc sine of x in the range [-pi2, +pi2].
atan :: Double -> Double Source #
The atan function computes the principal value of the arc tangent of x in the range [-pi2, +pi2].
atan2 :: Double -> Double -> Double Source #
The atan2 function computes the principal value of the arc tangent of y/x, using the signs of both arguments to determine the quadrant of the return value.
acosh :: Double -> Double Source #
The acosh function computes the inverse hyperbolic cosine of the real argument x.
asinh :: Double -> Double Source #
The asinh function computes the inverse hyperbolic sine of the real argument.
atanh :: Double -> Double Source #
The atanh function computes the inverse hyperbolic tangent of the real argument x.
exp :: Double -> Double Source #
The exp() function computes the exponential value of the given argument x.
frexp :: Double -> (Double, Int) Source #
Convert a floating-point number to fractional and integral components
ldexp :: Double -> Int -> Double Source #
The ldexp function multiplies a floating-point number by an integral power of 2. ldexp is not defined in the Haskell 98 report.
log :: Double -> Double Source #
The log() function computes the value of the natural logarithm of argument x.
log10 :: Double -> Double Source #
The log10 function computes the value of the logarithm of argument x to base 10. log10 is not defined in the Haskell 98 report.
modf :: Double -> (Double, Double) Source #
The modf function breaks the argument value into integral and fractional parts, each of which has the same sign as the argument.
pow :: Double -> Double -> Double Source #
The pow function computes the value of x to the exponent y.
floor :: Double -> Double Source #
The floor function returns the largest integral value less than or equal to x.
ceiling :: Double -> Double Source #
The ceil function returns the smallest integral value greater than or equal to x.
round :: Double -> Double Source #
Return the nearest value to x.
If x lies halfway between two values, then return the value with the larger absolute value (i.e. round away from zero).
fabs :: Double -> Double Source #
The fabs function computes the absolute value of a floating-point number x.
fmod :: Double -> Double -> Double Source #
The fmod function computes the floating-point remainder of x / y.
erf :: Double -> Double Source #
The erf calculates the error function of x. The error function is defined as:
erf(x) = 2/sqrt(pi)*integral from 0 to x of exp(-t*t) dt.
erfc :: Double -> Double Source #
The erfc function calculates the complementary error function of x; that is erfc() subtracts the result of the error function erf(x) from 1.0. This is useful, since for large x places disappear.
hypot :: Double -> Double -> Double Source #
The hypot function function computes the sqrt(x*x+y*y) in such a way that underflow will not happen, and overflow occurs only if the final result deserves it.
hypot(Infinity, v) = hypot(v, Infinity) = +Infinity for all v, including NaN.
isinf :: Double -> Int Source #
The isinf function returns 1 if the number n is Infinity, otherwise 0.
finite :: Double -> Int Source #
finite returns the value 1 just when -Infinity < x < +Infinity; otherwise a zero is returned (when |x| = Infinity or x is NaN.
j0 :: Double -> Double Source #
The functions j0() and j1() compute the Bessel function of the first kind of the order 0 and the order 1, respectively, for the real value x
j1 :: Double -> Double Source #
The functions j0() and j1() compute the Bessel function of the first kind of the order 0 and the order 1, respectively, for the real value x
y0 :: Double -> Double Source #
The functions y0() and y1() compute the linearly independent Bessel function of the second kind of the order 0 and the order 1, respectively, for the positive integer value x (expressed as a double)
y1 :: Double -> Double Source #
The functions y0() and y1() compute the linearly independent Bessel function of the second kind of the order 0 and the order 1, respectively, for the positive integer value x (expressed as a double)
yn :: Int -> Double -> Double Source #
yn() computes the Bessel function of the second kind for the integer Bessel0 n for the positive integer value x (expressed as a double).
logb :: Double -> Double Source #
logb x returns x's exponent n, a signed integer converted to double-precision floating-point.
logb(+-Infinity) = +Infinity; logb(0) = -Infinity with a division by zero exception.
nextafter :: Double -> Double -> Double Source #
nextafter returns the next machine representable number from x in direction y.
remainder :: Double -> Double -> Double Source #
remainder returns the remainder r := x - n*y where n is the integer nearest the exact value of xy; moreover if |n - xy| = 1/2 then n is even. Consequently, the remainder is computed exactly and |r| <= |y|/2. But remainder(x, 0) and remainder(Infinity, 0) are invalid operations that produce a NaN. --
scalb :: Double -> Double -> Double Source #
scalb(x, n) returns x*(2**n) computed by exponent manipulation.
significand :: Double -> Double Source #
significand(x) returns sig, where x := sig * 2**n with 1 <= sig < 2. significand(x) is not defined when x is 0, +-Infinity, or NaN.