In mathematics and computer science, the floor and ceiling functions map a real number to the next smallest or next largest integer. More precisely, floor(x) is the largest integer not greater than x and ceiling(x) is the smallest integer not less than x. Gauss introduced the square bracket notation [x] for the floor function in his third proof of quadratic reciprocity (1808).
This remained the standard in mathematics until Iverson introduced the names "floor" and "ceiling" and the corresponding notations and in his 1962 programming language APL. Both notations are now used in mathematics; this article follows Iverson. The floor function is also called the greatest integer or entier (French for "integer") function, and the floor of a nonnegative x may be called the integral part or integral value of x.
Computer languages (other than APL) commonly use ENTIER(x) (Algol), floor(x), or int(x) (C and C++).