Explain the following Math functions in Java:
Math.abs()
43 Likes
Returns the absolute value of its argument. Its return type is same as the type of its arguments. For example, Math.abs(-5) will return 5.
Answered By
29 Likes
What is wrong with the following statements? Explain.
i. result = (5/10) * Math.sqrt( a );
ii. result = math.sqrt(b * b - 4 * a * c) / ( 2 * a );
Math.sqrt()
Explain the following function:
Math.cbrt()
Distinguish between Math.ceil() and Math.floor()