FLOOR function
From Apache OpenOffice Wiki
< Documentation | How Tos
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Trigonometric
Hyperbolic
Rounding and remainders
Logarithm/Powers
Bessel functions
Miscellaneous
FLOOR
Returns a number rounded down to a multiple of another number.
Syntax:
FLOOR(number; significance; mode)
- number is the number that is to be rounded down to a multiple of significance.
- If mode is zero or omitted, FLOOR rounds down to the multiple below (more negative than or equal to) number. If mode is non-zero, FLOOR rounds down towards zero. This difference is only relevant with negative numbers.
- Use mode=1 for compatibility if you have negative numbers and wish to export to MS Excel. In MS Excel this function only takes two arguments.
Example:
FLOOR(8; 3)
- returns 6, because 2*3 = 6 is the first multiple of 3 below 8.
FLOOR(6; 3)
- returns 6.
FLOOR( -11; -2)
- returns -12, rounding to the multiple below.
FLOOR( -11; -2; 0)
- returns -12.
FLOOR( -11; -2; 1)
- returns -10, because with mode=1 the function rounds towards zero.
See Also