Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Float
- data Double
- newtype Ulp32 = Ulp32 {}
- c_rint :: CDouble -> CDouble
- c_ilogb :: CDouble -> CInt
- c_copysign :: CDouble -> CDouble -> CDouble
- c_significand :: CDouble -> CDouble
- c_scalb :: CDouble -> CDouble -> CDouble
- c_remainder :: CDouble -> CDouble -> CDouble
- c_nextafter :: CDouble -> CDouble -> CDouble
- c_logb :: CDouble -> CDouble
- c_cbrt :: CDouble -> CDouble
- c_atanh :: CDouble -> CDouble
- c_asinh :: CDouble -> CDouble
- c_acosh :: CDouble -> CDouble
- c_lgamma :: CDouble -> CDouble
- c_yn :: CInt -> CDouble -> CDouble
- c_y1 :: CDouble -> CDouble
- c_y0 :: CDouble -> CDouble
- c_j1 :: CDouble -> CDouble
- c_j0 :: CDouble -> CDouble
- c_finite :: CDouble -> CInt
- c_isnan :: CDouble -> CInt
- c_isinf :: CDouble -> CInt
- c_hypot :: CDouble -> CDouble -> CDouble
- c_gamma :: CDouble -> CDouble
- c_erfc :: CDouble -> CDouble
- c_erf :: CDouble -> CDouble
- c_trunc :: CDouble -> CDouble
- c_round :: CDouble -> CDouble
- c_fmod :: CDouble -> CDouble -> CDouble
- c_floor :: CDouble -> CDouble
- c_fabs :: CDouble -> CDouble
- c_ceil :: CDouble -> CDouble
- c_sqrt :: CDouble -> CDouble
- c_pow :: CDouble -> CDouble -> CDouble
- c_modf :: CDouble -> Ptr CDouble -> IO CDouble
- c_log10 :: CDouble -> CDouble
- c_log :: CDouble -> CDouble
- c_ldexp :: CDouble -> CInt -> Double
- c_frexp :: CDouble -> Ptr CInt -> IO Double
- c_exp :: CDouble -> CDouble
- c_tanh :: CDouble -> CDouble
- c_sinh :: CDouble -> CDouble
- c_cosh :: CDouble -> CDouble
- c_tan :: CDouble -> CDouble
- c_sin :: CDouble -> CDouble
- c_cos :: CDouble -> CDouble
- c_atan2 :: CDouble -> CDouble -> CDouble
- c_atan :: CDouble -> CDouble
- c_asin :: CDouble -> CDouble
- c_acos :: CDouble -> CDouble
- acos :: Double -> Double
- asin :: Double -> Double
- atan :: Double -> Double
- atan2 :: Double -> Double -> Double
- cos :: Double -> Double
- sin :: Double -> Double
- tan :: Double -> Double
- cosh :: Double -> Double
- sinh :: Double -> Double
- tanh :: 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
- ceil :: Double -> Double
- fabs :: Double -> Double
- floor :: Double -> Double
- fmod :: Double -> Double -> Double
- round :: Double -> Double
- trunc :: Double -> Double
- erf :: Double -> Double
- erfc :: Double -> Double
- gamma :: Double -> Double
- hypot :: Double -> Double -> Double
- isinf :: Double -> Int
- isnan :: Double -> Int
- finite :: Double -> Int
- j0 :: Double -> Double
- j1 :: Double -> Double
- y0 :: Double -> Double
- y1 :: Double -> Double
- yn :: Int -> Double -> Double
- lgamma :: Double -> Double
- acosh :: Double -> Double
- asinh :: Double -> Double
- atanh :: 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
- eq :: Double -> Double -> Bool
- eqf :: Float -> Float -> Bool
- maxNorm :: Double
- maxNormf :: Float
- minNorm :: Double
- minNormf :: Float
- maxOdd :: Double
- maxOddf :: Float
- minSub :: Double
- minSubf :: Float
- epsilon :: Double
- epsilonf :: Float
- split :: Double -> Either Double Double
- splitf :: Float -> Either Float Float
- shift :: Int64 -> Double -> Double
- shiftf :: Int32 -> Float -> Float
- ulps :: Double -> Double -> (Bool, Word64)
- ulpsf :: Float -> Float -> (Bool, Word32)
- ulps' :: Double -> Double -> Word64
- ulpsf' :: Float -> Float -> Word32
- within :: Word64 -> Double -> Double -> Bool
- withinf :: Word32 -> Float -> Float -> Bool
- ulp32Nan :: Ulp32 -> Bool
- f32u32 :: Conn Float Ulp32
- u32f32 :: Conn Ulp32 Float
- signBit :: Double -> Bool
- evenBit :: Double -> Bool
- lsbMask :: Double -> Word64
- msbMask :: Double -> Word64
- sigMask :: Double -> Word64
- signBitf :: Float -> Bool
- evenBitf :: Float -> Bool
- lsbMaskf :: Float -> Word32
- msbMaskf :: Float -> Word32
- expMaskf :: Float -> Word32
- sigMaskf :: Float -> Word32
- signed64 :: Word64 -> Int64
- unsigned64 :: Int64 -> Word64
- int64Double :: Int64 -> Double
- doubleInt64 :: Double -> Int64
- word64Double :: Word64 -> Double
- doubleWord64 :: Double -> Word64
- signed32 :: Word32 -> Int32
- unsigned32 :: Int32 -> Word32
- int32Float :: Int32 -> Float
- floatInt32 :: Float -> Int32
- word32Float :: Word32 -> Float
- floatWord32 :: Float -> Word32
Documentation
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
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
32 bit unit of least precision type.
Instances
c_significand :: CDouble -> CDouble Source #
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.
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).
exp :: Double -> Double Source #
The exp() function computes the exponential value of the given argument x.
frexp :: Double -> (Double, Int) Source #
frexp convert floating-point number to fractional and integral components frexp is not defined in the Haskell 98 report.
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. modf is not defined in the Haskell 98 report.
pow :: Double -> Double -> Double Source #
The pow function computes the value of x to the exponent y.
ceil :: Double -> Double Source #
The ceil function returns the smallest integral value greater than or equal to x.
fabs :: Double -> Double Source #
The fabs function computes the absolute value of a floating-point number x.
floor :: Double -> Double Source #
The floor function returns the largest integral value less than or equal to x.
fmod :: Double -> Double -> Double Source #
The fmod function computes the floating-point remainder of x / y.
round :: Double -> Double Source #
The round function returns the nearest integral value to x; if x lies halfway between two integral values, then these functions return the integral value with the larger absolute value (i.e., it rounds away from zero).
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.
isnan :: Double -> Int Source #
The isnan function returns 1 if the number n is ``not-a-number'', 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).
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.
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.
ilogb :: Double -> Int Source #
ilogb() returns x's exponent n, in integer format. ilogb(+-Infinity) re- turns INT_MAX and ilogb(0) returns INT_MIN.
rint :: Double -> Double Source #
The rint() function returns the integral value (represented as a double precision number) nearest to x according to the prevailing rounding mode.
split :: Double -> Either Double Double Source #
Split a Double
symmetrically along the sign bit.
>>>
split 0
Right 0.0>>>
split (shift (-1) 0)
Left (-0.0)
within :: Word64 -> Double -> Double -> Bool Source #
Compare two values for approximate equality.
Required accuracy is specified in units of least precision.
See also https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/.
unsigned64 :: Int64 -> Word64 Source #
int64Double :: Int64 -> Double Source #
doubleInt64 :: Double -> Int64 Source #
word64Double :: Word64 -> Double Source #
doubleWord64 :: Double -> Word64 Source #
unsigned32 :: Int32 -> Word32 Source #
int32Float :: Int32 -> Float Source #
floatInt32 :: Float -> Int32 Source #
word32Float :: Word32 -> Float Source #
floatWord32 :: Float -> Word32 Source #