You are on page 1of 1

MATH FUNCTIONS IN JAVA:

1.The Math.abs() function returns the absolute value of the parameter passed to it.

2. The Math.ceil() function rounds a floating point value up to the nearest integer value.

3. The Math.floor() function rounds a floating point value down to the nearest integer value.

4. The Math.floorDiv() method divides one integer (int or long) by another, and rounds the result
down to the nearest integer value.

5. The Math.min() method returns the smallest of two values passed to it as parameter.

6. The Math.max() method returns the largest of two values passed to it as parameter.

7. The Math.round() method rounds a float or double to the nearest integer using normal math round
rules (either up or down).

8. The Math.random() method returns a random floating point number between 0 and 1.

9. The Math.exp() function returns e (Euler's number) raised to the power of the value provided as
parameter.

10. The Math.log() method provides the logarithm of the given parameter.

11. he Math.log10 method works like the Math.log() method except is uses 10 as is base for calculating
the logarithm instead of e (Euler's Number).

12. The Math.pow() function takes two parameters. The method returns the value of the first parameter
raised to the power of the second parameter.

13. he Math.sqrt() method calculates the square root of the parameter given to it.

14. The Math.PI constant is a double with a value that is very close to the value of PI - the mathematical
definition of PI.

15. The Math.sin() method calculates the sine value of some angle value in radians.

16. he Math.cos() method calculates the cosine value of some angle value in radians.

17. The Math.tan() method calculates the tangens value of some angle value in radians.

18. The Math.asin() method calculates the arc sine value of a value between 1 and -1.

19. The Math.acos() method calculates the arc cosine value of a value between 1 and -1.

20. The Math.atan() method calculates the arc tangens value of a value between 1 and -1.

21. The Math.sinh() method calculates the hyperbolic sine value of a value between 1 and -1.

22. The Math.cosh() method calculates the hyperbolic cosine value of a value between 1 and -1.

23. The Math.tanh() method calculates the hyperbolic tangens value of a value between 1 and -1.

24. The Math.toDegrees() method converts an angle in radians to degrees.

You might also like