 Home >>Java Math Methods

# Java Math Methods

### Java Math Methods

The Java Math Methods or the math class basically possesses many methods that generally permits the programmer to execute mathematical tasks on the numbers.

Here are all the math functions or methods that are used in the Java language. This below depicted table consists of the method name, description and the return type:

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

## Java Math Methods Index

Sr.No. Topics
1 Java Math.abs() method
2 Java Math.acos() method
3 Java Math.asin() method
4 Java Math.atan() method
5 Java Math.cbrt() method
6 Java Math.ceil() method
7 Java Math.copySign() method
8 Java Math.cos() method
9 Java Math.cosh() method
10 Java Math.exp() method
11 Java Math.expm1() method
12 Java Math.floor() method
13 Java Math.getExponent() method
14 Java Math.hypot() method
15 Java Math.IEEEremainder() method
16 Java Math.log() method
17 Java Math.log10() method
18 Java Math.log1() method
19 Java Math.max() method
20 Java Math.min() method
21 Java Math.nextAfter() method
22 Java Math.nextUp() Method
23 Java Math.pow() Method
24 Java Math.random() Method
25 Java Math.round() Method
26 Java Math.rint() Method
27 Java Math.signum() method
28 Java Math.sin() method
29 Java Math.sinh() method
30 Java Math.sqrt() method
31 Java Math.tan() method
32 Java Math.tanh() method
33 Java Math.toDegrees() method