- published: 27 Jan 2016
- views: 436
Floor and ceiling functions
In mathematics and computer science, the floor and ceiling functions map a real number to the largest previous or the smallest following integer, respectively. More precisely, floor(x) = Failed to parse (Missing texvc executable; please see math/README to configure.): \lfloor x\rfloor
Carl Friedrich 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 Kenneth E. Iverson introduced the names "floor" and "ceiling" and the corresponding notations Failed to parse (Missing texvc executable; please see math/README to configure.): \lfloor xFailed to parse (Missing texvc executable; please see math/README to configure.): \rfloor
xFailed to parse (Missing texvc executable; please see math/README to configure.): \rceil
The floor function is also called the greatest integer or entier (French for "integer") function, and its value at x is called the integral part or integer part of x; for negative values of x the latter terms are sometimes instead taken to be the value of the ceiling function, i.e., the value of x rounded to an integer towards 0. The language APL (programming language) uses ⌊x
; other computer languages commonly use notations like entier(x)
(Algol), INT(x)
(BASIC), or floor(x)
(C, C++, R, and Python). In mathematics, it can also be written with boldface or double brackets Failed to parse (Missing texvc executable; please see math/README to configure.): [\![x]\!] .