What will be the result of the following java expression: Math.ceil(-13.9)
Answers
Answer:
The java. lang. Math. ceil() returns the double value that is greater than or equal to the argument and is equal to the nearest mathematical integer.
Answer:
Its return the smallest double value that is greater then or equal to argument and mathematical integer.
Explanation:
Some Special cases −
If the argument value is already equal to a mathematical integer, then the result is the same as the argument.
If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.
If the argument value is less than zero but greater than -1.0, then the result is negative zero.
Note that the value of Math.ceil(x) is exactly the value of -Math.floor(-x).
With you want to more details please visit
tuitorialspoint