A DESCRIPTION OF THE PROBLEM :
Descriptions to the logical pair of functions "java.lang.Math.ceil()" and "java.lang.Math.floor()" are opposite to what it should be. So the description of ceil() describes floor() and vice versa. See also these descriptions in java.math.RoundingMode, where they are correctly placed.
Note: Since errors in rounding operations are often not obviously seen in results, using of the current function descriptions leads to errors, which are extremely difficult to find.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Change places of descriptions. ceil() describes floor() and vice versa.
ACTUAL -
ceil(double a)
Returns the smallest (closest to negative infinity) double value that is greater than or equal to the argument and is equal to a mathematical integer.
floor(double a)
Returns the largest (closest to positive infinity) double value that is less than or equal to the argument and is equal to a mathematical integer.
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/javase/6/docs/api/