Math functions from java.lang.Math. Many of those functions are overloaded for Float and Double, so we introduce a type class Floating to avoid overloading issues.
For example
f x = 2 * sqrt x
would give a type error, because the compiler wouldn't know whether to use
sqrt :: Float -> Double
or
sqrt :: Double -> Double
Note that many functions return Double, no matter if the argument was Double or Float.
Returns a Double with a positive sign, greater than or equal to 0.0 and less than 1.0.
square
Returns the arc cosine of a value; the returned angle is in the range 0.0 through Floating.pi.
Inverse hyperbolic function for Floating.cosh
Returns the arc sine of a value; the returned angle is in the range -Floating.pi/2 through Floating.pi/2.
Inverse hyperbolic function for Floating.sinh
Returns the arc tangent of a value; the returned angle is in the range -Floating.pi/2 through Floating.pi/2.
Returns the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta).
Inverse hyperbolic function for Floating.tanh
Returns the cube root of a value.
Returns the smallest (closest to negative infinity) value that is greater than or equal to the argument and is equal to a mathematical integer.
Returns the first argument with the sign of the second argument.
Returns the trigonometric cosine of an angle.
Returns the hyperbolic cosine of a floating point value.
The value that is closer than any other to e, the base of the natural logarithms.
Returns Euler's number Floating.e raised to the power of a floating-point value.
Returns e^x -1.
Returns the largest (closest to positive infinity) value that is less than or equal to the argument and is equal to a mathematical integer.
Special cases:
Returns the unbiased exponent used in the representation of a floating point number.
Returns Floating.sqrt (x² + y²) without intermediate overflow or underflow.
Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard.
Returns the natural logarithm (base Floating.e) of a value.
Returns the base 10 logarithm of a value.
Returns the natural logarithm of the sum of the argument and 1.
Returns the logarithm of the second argument to the base given by the first argument.
Returns the floating-point number adjacent to the first argument in the direction of the second argument.
Returns the floating-point value adjacent to the argument in the direction of positive infinity.
The value that is closer than any other to pi, the ratio of the circumference of a circle to its diameter.
Returns the value of the first argument raised to the power of the second argument.
Returns the double value that is closest in value to the argument and is equal to a mathematical integer.
Returns the closest Long to the argument, with ties rounding up.
scalb d scaleFactor
Return d * 2^scaleFactor rounded as if performed by a single correctly rounded floating-point multiply.
Returns the signum function of the argument; zero if the argument is zero, 1.0 if the argument is greater than zero, -1.0 if the argument is less than zero.
Returns the trigonometric sine of an angle.
Returns the hyperbolic sine of a value.
Returns the correctly rounded positive square root of a value.
Returns the trigonometric tangent of an angle.
Returns the hyperbolic tangent of a floating point value.
Converts an angle measured in radians to an approximately equivalent angle measured in degrees.
Converts an angle measured in degrees to an approximately equivalent angle measured in radians.
Returns the size of an ulp of the argument.
inherited from Floating.logBase
inherited from Floating.logBase
Floating_Double.pow, Floating_Double.nextAfter, Floating_Double.ieeeRemainder, Floating_Double.logBase, Floating_Double.atan2, Floating_Double.copySign, Floating_Double.hypot
Floating_Double.ulp, Floating_Double.tanh, Floating_Double.toDegrees, Floating_Double.toRadians, Floating_Double.sqrt, Floating_Double.sin, Floating_Double.sinh, Floating_Double.tan, Floating_Double.rint, Floating_Double.nextUp, Floating_Double.log1p, Floating_Double.log, Floating_Double.log10, Floating_Double.signum, Floating_Double.expm1, Floating_Double.floor, Floating_Double.cos, Floating_Double.cosh, Floating_Double.exp, Floating_Double.ceil, Floating_Double.atanh, Floating_Double.cbrt, Floating_Double.asin, Floating_Double.asinh, Floating_Double.acos, Floating_Double.acosh, Floating_Double.atan
Floating_Float.pow, Floating_Float.nextAfter, Floating_Float.ieeeRemainder, Floating_Float.logBase, Floating_Float.atan2, Floating_Float.hypot
Floating_Float.tanh, Floating_Float.toDegrees, Floating_Float.toRadians, Floating_Float.sqrt, Floating_Float.sin, Floating_Float.sinh, Floating_Float.tan, Floating_Float.rint, Floating_Float.log1p, Floating_Float.log, Floating_Float.log10, Floating_Float.expm1, Floating_Float.floor, Floating_Float.cos, Floating_Float.cosh, Floating_Float.exp, Floating_Float.ceil, Floating_Float.atanh, Floating_Float.cbrt, Floating_Float.asin, Floating_Float.asinh, Floating_Float.acos, Floating_Float.acosh, Floating_Float.atan
Floating_Float.ulp, Floating_Float.nextUp, Floating_Float.signum
Floating.pow, Floating.logBase, Floating.nextAfter, Floating.ieeeRemainder, Floating.hypot, Floating.atan2
Floating.toDegrees, Floating.toRadians, Floating.tan, Floating.sqrt, Floating.tanh, Floating.sin, Floating.rint, Floating.sinh, Floating.log10, Floating.log1p, Floating.floor, Floating.exp, Floating.expm1, Floating.log, Floating.cos, Floating.ceil, Floating.cbrt, Floating.atan, Floating.asin, Floating.acos, Floating.acosh, Floating.asinh, Floating.atanh, Floating.cosh