Currently there may be errors shown on top of a page, because of a missing Wiki update (PHP version and extension DPL3). |
Navigation
Topics | Help • Register • News • History • How to • Sequences statistics • Template prototypes |
Difference between revisions of "Floor function"
(new) |
(Moving to new subcategory) |
||
Line 27: | Line 27: | ||
==External links== | ==External links== | ||
*[[Wikipedia:Floor and ceiling functions|Wikipedia]] | *[[Wikipedia:Floor and ceiling functions|Wikipedia]] | ||
− | [[Category: | + | [[Category:Functions]] |
Latest revision as of 16:56, 29 August 2022
In mathematics and computer science, the floor function is the function that takes as input a real number [math]\displaystyle{ x }[/math] and gives as output the greatest integer less than or equal to [math]\displaystyle{ x }[/math], denoted [math]\displaystyle{ \operatorname{floor}(x) = \lfloor x\rfloor }[/math].
Similarly, the ceiling function maps [math]\displaystyle{ x }[/math] to the least integer greater than or equal to [math]\displaystyle{ x }[/math], denoted [math]\displaystyle{ \operatorname{ceil}(x) = \lceil x \rceil }[/math].
Examples
x | Floor [math]\displaystyle{ \lfloor x\rfloor }[/math] | Ceiling [math]\displaystyle{ \lceil x\rceil }[/math] |
---|---|---|
2 | 2 | 2 |
2.4 | 2 | 3 |
2.9 | 2 | 3 |
−2.7 | −3 | −2 |
−2 | −2 | −2 |