Method Description Return Type
abs(x) Returns the absolute value of x double|float|int|long
acos(x) Returns the arccosine of x, in radians double
addExact(x, y) Returns the sum of x and y int|long
asin(x) Returns the arcsine of x, in radians double
Returns the arctangent of x as a numeric value
atan(x) double
between -PI/2 and PI/2 radians
Returns the angle theta from the conversion of
atan2(y,x) rectangular coordinates (x, y) to polar double
coordinates (r, theta).
cbrt(x) Returns the cube root of x double
Returns the value of x rounded up to its nearest
ceil(x) double
integer
Returns the first floating point x with the sign of
copySign(x, y) double|float
the second floating point y
cos(x) Returns the cosine of x (x is in radians) double
cosh(x) Returns the hyperbolic cosine of a double value double
decrementExact(x) Returns x-1 int|long
exp(x) Returns the value of Ex double
expm1(x) Returns ex -1 double
Returns the value of x rounded down to its
floor(x) double
nearest integer
Returns the division between x and y rounded
floorDiv(x, y) int|long
down
Returns the remainder of a division between x
floorMod(x, y) and y where the result of the division was int|long
rounded down
Method Description Return Type
getExponent(x) Returns the unbiased exponent used in x int
Returns sqrt(x2 +y2) without intermediate
hypot(x, y) double
overflow or underflow
Computes the remainder operation on x and y
IEEEremainder(x, y) double
as prescribed by the IEEE 754 standard
incrementExact(x) Returns x+1 int|double
log(x) Returns the natural logarithm (base E) of x double
log10(x) Returns the base 10 logarithm of x double
Returns the natural logarithm (base E) of the
log1p(x) double
sum of x and 1
max(x, y) Returns the number with the highest value double|float|int|long
min(x, y) Returns the number with the lowest value double|float|int|long
multiplyExact(x, y) Returns the result of x multiplied with y int|long
negateExact(x) Returns the negation of x int|long
Returns the floating point number adjacent to x
nextAfter(x, y) double|float
in the direction of y
Returns the floating point value adjacent to x in
nextDown(x) double|float
the negative direction
Returns the floating point value adjacent to x in
nextUp(x) double|float
the direction of positive infinity
pow(x, y) Returns the value of x to the power of y double
random() Returns a random number between 0 and 1 double
Returns the double value that is closest to x and
rint(x) double
equal to a mathematical integer
Returns the value of x rounded to its nearest
round(x) long|int
integer
Method Description Return Type
scalb(x, y) Returns x multiplied by 2 to the power of y double|float
signum(x) Returns the sign of x double|float
sin(x) Returns the sine of x (x is in radians) double
sinh(x) Returns the hyperbolic sine of a double value double
sqrt(x) Returns the square root of x double
subtractExact(x, y) Returns the result of x minus y int|long
tan(x) Returns the tangent of an angle double
tanh(x) Returns the hyperbolic tangent of a double value double
Converts an angle measured in radians to an
toDegrees(x) double
approx. equivalent angle measured in degrees
toIntExact(x) Converts a long value to an int int
Converts an angle measured in degrees to an
toRadians(x) double
approx. angle measured in radians
Returns the size of the unit of least precision
ulp(x) double|float
(ulp) of x