Floor function

From Prime-Wiki
Jump to: navigation, search

In mathematics and computer science, the floor function is the function that takes as input a real number [math]x[/math] and gives as output the greatest integer less than or equal to [math]x[/math], denoted [math]\operatorname{floor}(x) = \lfloor x\rfloor[/math].

Similarly, the ceiling function maps [math]x[/math] to the least integer greater than or equal to [math]x[/math], denoted [math]\operatorname{ceil}(x) = \lceil x \rceil[/math].


x Floor [math]\lfloor x\rfloor[/math] Ceiling [math]\lceil x\rceil[/math]
2 2 2
2.4 2 3
2.9 2 3
−2.7 −3 −2
−2 −2 −2

External links