CEILING() and FLOOR() Formula Functions Behave Differently for Negative Numbers
|Knowledge Article Number||000199099|
|Description||When using the CEILING() and FLOOR() formula functions, numbers are rounded up (to the nearest integer) and down (to the nearest integer) respectively. However, when the number is negative, the behavior is reversed.
For example, the results of a positive and negative number:
CEILING (2.5) = 3.0
FLOOR (2.5) = 2.0
CEILING (-2.5) = -3.0
FLOOR(-2.5) = -2.0
|Resolution||When a negative number is used in a CEILING() function, the application uses the FLOOR() function instead. And when the FLOOR() function is used for a negative number, the CEILING() function will be used.
In other words the function applies on the number as an absolute value. Example for Ceiling of -2.5, the system applies the Ceiling to 2.5 and hence the result is 3. Then the negative is added.