|
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'') = is the largest integer not greater than ''x'' and ceiling(''x'') = is the smallest integer not less than ''x''.〔Graham, Knuth, & Patashnik, Ch. 3.1〕 ==Notation== Carl Friedrich Gauss introduced the square bracket notation for the floor function in his third proof of quadratic reciprocity (1808).〔Lemmermeyer, pp. 10, 23.〕 This remained the standard〔e.g. Cassels, Hardy & Wright, and Ribenboim use Gauss's notation, Graham, Knuth & Patashnik, and Crandall & Pomerance use Iverson's.〕 in mathematics until Kenneth E. Iverson introduced the names "floor" and "ceiling" and the corresponding notations and in his 1962 book ''A Programming Language''.〔Iverson, p. 12.〕〔Higham, p. 25.〕 Both notations are now used in mathematics;〔See the Wolfram MathWorld article.〕 this article follows Iverson. 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 uses ⌊x ; other computer languages commonly use notations like entier(x) (ALGOL), INT(x) (BASIC), or floor(x) (C, C++, R, and Python).〔Sullivan, p. 86.〕 In mathematics, it can also be written with boldface or double brackets .〔(Mathwords: Floor Function ).〕The ceiling function is usually denoted by ceil(x) or ceiling(x) in non-APL computer languages that have a notation for this function. The J Programming Language, a follow on to APL that is designed to use standard keyboard symbols, uses >. for ceiling and <. for floor.〔(【引用サイトリンク】work=J Language )〕 In mathematics, there is another notation with reversed boldface or double brackets 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Floor and ceiling functions」の詳細全文を読む スポンサード リンク
|