-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A binding to the standard C math library -- -- A binding to the standard C math library @package cmath @version 0.2 module Foreign.C.Math.Double -- | The acos function computes the principal value of the arc cosine of x -- in the range [0, pi] acos :: Double -> Double c_acos :: CDouble -> CDouble -- | The asin function computes the principal value of the arc sine of x in -- the range [-pi2, +pi2]. asin :: Double -> Double c_asin :: CDouble -> CDouble -- | The atan function computes the principal value of the arc tangent of x -- in the range [-pi2, +pi2]. atan :: Double -> Double c_atan :: CDouble -> CDouble -- | 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. atan2 :: Double -> Double -> Double c_atan2 :: CDouble -> CDouble -> CDouble -- | 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). cos :: Double -> Double c_cos :: CDouble -> CDouble -- | 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). sin :: Double -> Double c_sin :: CDouble -> CDouble -- | 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). tan :: Double -> Double c_tan :: CDouble -> CDouble -- | The cosh function computes the hyperbolic cosine of x. cosh :: Double -> Double c_cosh :: CDouble -> CDouble -- | The sinh function computes the hyperbolic sine of x. sinh :: Double -> Double c_sinh :: CDouble -> CDouble -- | The tanh function computes the hyperbolic tangent of x. tanh :: Double -> Double c_tanh :: CDouble -> CDouble -- | The exp() function computes the exponential value of the given -- argument x. exp :: Double -> Double c_exp :: CDouble -> CDouble -- | frexp convert floating-point number to fractional and integral -- components frexp is not defined in the Haskell 98 report. frexp :: Double -> (Double, Int) c_frexp :: CDouble -> Ptr CInt -> IO Double -- | The ldexp function multiplies a floating-point number by an integral -- power of 2. ldexp is not defined in the Haskell 98 report. ldexp :: Double -> Int -> Double c_ldexp :: CDouble -> CInt -> Double -- | The log() function computes the value of the natural logarithm of -- argument x. log :: Double -> Double c_log :: CDouble -> CDouble -- | The log10 function computes the value of the logarithm of argument x -- to base 10. log10 is not defined in the Haskell 98 report. log10 :: Double -> Double c_log10 :: CDouble -> CDouble -- | 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. modf :: Double -> (Double, Double) c_modf :: CDouble -> Ptr CDouble -> IO CDouble -- | The pow function computes the value of x to the exponent y. pow :: Double -> Double -> Double c_pow :: CDouble -> CDouble -> CDouble -- | The sqrt function computes the non-negative square root of x. sqrt :: Double -> Double c_sqrt :: CDouble -> CDouble -- | The ceil function returns the smallest integral value greater than or -- equal to x. ceil :: Double -> Double c_ceil :: CDouble -> CDouble -- | The fabs function computes the absolute value of a floating-point -- number x. fabs :: Double -> Double c_fabs :: CDouble -> CDouble -- | The floor function returns the largest integral value less than or -- equal to x. floor :: Double -> Double c_floor :: CDouble -> CDouble -- | The fmod function computes the floating-point remainder of x / y. fmod :: Double -> Double -> Double c_fmod :: CDouble -> CDouble -> CDouble -- | 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). round :: Double -> Double c_round :: CDouble -> CDouble -- | The fmod function computes the floating-point remainder of x / y. trunc :: Double -> Double c_trunc :: CDouble -> CDouble -- | 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. --erf :: Double -> Double c_erf :: CDouble -> CDouble -- | 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. erfc :: Double -> Double c_erfc :: CDouble -> CDouble -- | The gamma function. gamma :: Double -> Double c_gamma :: CDouble -> CDouble -- | 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. --hypot :: Double -> Double -> Double c_hypot :: CDouble -> CDouble -> CDouble -- | The isinf function returns 1 if the number n is Infinity, otherwise 0. isinf :: Double -> Int c_isinf :: CDouble -> CInt -- | The isnan function returns 1 if the number n is ``not-a-number'', -- otherwise 0. isnan :: Double -> Int c_isnan :: CDouble -> CInt -- | finite returns the value 1 just when -Infinity < x < +Infinity; -- otherwise a zero is returned (when |x| = Infinity or x is NaN. finite :: Double -> Int c_finite :: CDouble -> CInt -- | 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 j0 :: Double -> Double c_j0 :: CDouble -> CDouble -- | 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 c_j1 :: CDouble -> CDouble -- | 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) y0 :: Double -> Double c_y0 :: CDouble -> CDouble -- | 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 c_y1 :: CDouble -> CDouble -- | yn() computes the Bessel function of the second kind for the integer -- Bessel0 n for the positive integer value x (expressed as a double). yn :: Int -> Double -> Double c_yn :: CInt -> CDouble -> CDouble -- | lgamma(x) returns ln|| (x)|. lgamma :: Double -> Double c_lgamma :: CDouble -> CDouble