Math Functions
Math Functions
| Function | Description |
|---|---|
| abs(double a) | Returns the absolute value of a number. |
| acos(double a) | Returns the arc cosine of a value. The returned angle is in the range 0.0 through pi. |
| asin(double a) | Returns the arc sine of a value. The returned angle is in the range -pi/2 through pi/2. |
| atan(double a) | Returns the arc tangent of a value; the returned angle is in the range -pi/2 through pi/2. |
| atan2(double y, double x) | Returns the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta). |
| cbrt(double a) | Returns the cube root of a double value. |
| ceil(double a) | Returns the smallest (closest to negative infinity) double value that is greater than or equal to the argument and is equal to a mathematical integer. |
| copySign(double magnitude, double sign) / (float magnitude, float sign) |
Returns the first floating-point argument with the sign of the second floating-point argument. |
| cos(double a) | Returns the trigonometric cosine of an angle. |
| cosh(double x) | Returns the hyperbolic cosine of a double value. |
| exp(double a) | Returns Euler’s number e raised to the power of a double value. |
| expm1(double x) | Returns ex -1. |
| floor(double a) | Returns the largest (closest to positive infinity) double value that is less than or equal to the argument and is equal to a mathematical integer. |
| format(double d) | Formats double value. |
| format(double d, String fmt) | Formats double value according to Format fmt. |
| getExponent(double a) | Returns the unbiased exponent used in the representation of a. |
| getExponent(double x, double y) | Returns sqrt(x2 +y2) without intermediate overflow or underflow. |
| IEEEremainder(double f1, double f2) | Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard. |
| isInfinite(number) | Determines whether an input value is infinitely large in magnitude. |
| isNaN(number) | Determines whether an input value is a non-numeric value. |
| log(double a) | Returns the natural logarithm (base e) of a double value. |
| log10(double a) | Returns the base 10 logarithm of a double value. |
| log1p(double x) | Returns the natural logarithm of the sum of the argument and 1. |
| mod(double number, double divisor) | Returns the remainder after a number is divided by a divisor. |
| nextAfter(double start, double direction) / (float start, float direction) |
Returns the floating-point number adjacent to the first argument in the direction of the second argument. |
| pow(double a, double b) | Returns the value of the first argument raised to the power of the second argument. |
| quotient(double number, double divisor) | Returns the quotient from division number by divisor. |
| random() | Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0. |
| rint(double a) | Returns the double value that is closest in value to the argument and is equal to a mathematical integer. |
| round(double value) | Returns the closest value to the argument, with ties rounding up. |
| round(double value, int scale, int roundingMethod) | Returns a number which scale is the specified value, and which unscaled value is determined by multiplying or dividing this number’s unscaled value by the appropriate power of ten to maintain its overall value. |
| roundStrict(double value) | Returns the closest value to the argument without adding ulp. |
| scalb(double a, int scaleFactor) | Return a × 2scaleFactor rounded as if performed by a single correctly rounded floating-point multiply to a member of the double value set. |
| signum(double d) / (float f) | 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. |
| sin(double a) | Returns the trigonometric sine of an angle. |
| sinh(double x) | Returns the hyperbolic sine of a double value. |
| sqrt(double a) | Returns the correctly rounded positive square root of a double value. |
| tan(double a) | Returns the trigonometric tangent of an angle. |
| tanh(double x) | Returns the hyperbolic tangent of a double value. |
| toDegrees(double angrad) | Converts an angle measured in radians to an approximately equivalent angle measured in degrees. |
| toRadians(double angdeg) | Converts an angle measured in degrees to an approximately equivalent angle measured in radians. |
| ulp(double value) | Returns the size of an ulp of the argument. |