In mathematics, the floor function (or greatest integer function) is the function that takes as input a real number x, and gives as output the greatest integer less than or equal to x, denoted ⌊x⌋ or floor(x). Similarly, the ceiling function maps x to the smallest integer greater than or equal to x, denoted ⌈x⌉ or ceil(x).[1]
For example, for floor: ⌊2.4⌋ = 2, ⌊−2.4⌋ = −3, and for ceiling: ⌈2.4⌉ = 3, and ⌈−2.4⌉ = −2.
Historically, the floor of x has been–and still is–called the integral part or integer part of x, often denoted [x] (as well as a variety of other notations).[2] However, the same term, integer part, is also used for truncation towards zero, which differs from the floor function for negative numbers.
For n an integer, ⌊n⌋ = ⌈n⌉ = [n] = n.
Although floor(x+1) and ceil(x) produce graphs that appear exactly alike, they are not the same when the value of x is an exact integer. For example, when x=2.0001; ⌊2.0001+1⌋ = ⌈2.0001⌉ = 3. However, if x=2, then ⌊2+1⌋ = 3, while ⌈2⌉ = 2.
Examples
x
Floor ⌊x⌋
Ceiling ⌈x⌉
Fractional part {x}
2
2
2
0
2.0001
2
3
0.0001
2.4
2
3
0.4
2.9
2
3
0.9
2.999
2
3
0.999
−2.7
−3
−2
0.3
−2
−2
−2
0
^Graham, Knuth, & Patashnik, Ch. 3.1
^
1) Luke Heaton, A Brief History of Mathematical Thought, 2015, ISBN 1472117158 (n.p.)
2) Albert A. Blank et al., Calculus: Differential Calculus, 1968, p. 259
3) John W. Warris, Horst Stocker, Handbook of mathematics and computational science, 1998, ISBN 0387947469, p. 151
and 25 Related for: Floor and ceiling functions information
trunc(x,0) is written as [x].[citation needed] See Notation of floorandceilingfunctions. With computers, truncation can occur when a decimal number is...
ceiling corner brackets ⌈ and ⌉ (U+2308, U+2309) are used to denote the integer floorandceilingfunctions. The Quine corners ⌜ and ⌝ have at least two uses...
Italian, a mezzanino) is an intermediate floor in a building which is partly open to the double-height ceilingedfloor below, or which does not extend over...
some mathematical notation: the Iverson bracket, floorandceilingfunctions, and notation for rising and falling factorials. Donald Knuth used the first...
ImageWidth is expressed in pixels. The equation above uses the floorandceilingfunctions. The total number of bytes necessary to store an array of pixels...
the ceiling fan. He continued to make improvements to his invention and created a light kit fitted to the ceiling fan to combine both functions in one...
10 x ⌋ {\displaystyle c:=\lfloor -\log _{10}x\rfloor } (cf. Floorandceilingfunctions). A similar measurement is sometimes used to describe the purity...
A glass ceiling is a metaphor usually applied to people of marginalized genders, used to represent an invisible barrier that prevents an oppressed demographic...
to compute the quantile estimate from h, x⌊h⌋, and x⌈h⌉. (For notation, see floorandceilingfunctions). The first three are piecewise constant, changing...
carry both a floorandceiling called a single floor (single joist floor, single framed floor) or two sets of joists, one carrying the floorand another carrying...
{\displaystyle \lfloor x\rfloor } and ⌈ x ⌉ {\displaystyle \lceil x\rceil } denote the floorandceilingfunctions. Returning to the first of these series...
sector contains a number of properties: a floor height, ceiling height, light level, a floor texture and a ceiling texture. To have a different light level...
}}n<0\\\end{cases}}} where sgn is the sign function, ⌊⌋ is the floorfunction (rounding down), and ⌈⌉ is the ceilingfunction (rounding up). Thus according to equation...
functions or groups of functions are important enough to deserve their own names. This is a listing of articles which explain some of these functions...
version made of marble. The iron and glass ceiling, including the skylight, was replaced with a ceiling of stainless steel and plaster. This redesign, in addition...
below the roof of the building; its ceiling is often pitched and/or at a different height from that of other floors. A penthouse is a luxury apartment...
government functions under one roof. The tower has a helipad on its roof. It was originally planned to have 28 floors for government functions only, with...
about 35 metres (118 feet) long and 14 m (46 ft) wide, with the ceiling rising to about 20 m (66 ft) above the main floor.: 28 Its exterior is unadorned...
trapdoor is a sliding or hinged door that is flush with the surface of a floor, ceiling, or roof. It is traditionally small in size. It was invented to facilitate...
the range of each solution π / 2 {\displaystyle \pi /2} and using the floor or ceilingfunctions: N = ⌊ 2 u 0 π ⌋ + 1 = ⌈ 2 u 0 π ⌉ {\displaystyle N=\left\lfloor...