![]() |
|
|
| |
|
||||
Some properties of the floor functionWe always have
with equality on the left if and only if x is an integer. For any integer k and any real number x, we have
The ordinary rounding of the number x to the nearest integer can be expressed as floor(x + 0.5). The floor function is not continuous, but it is upper semi-continuous. If x is a real number and n is an integer, we have n ≤ x if and only if n ≤ floor(x). In fancy language: the floor function is part of a Galois connection; it is the upper adjoint of the function which embeds the integers into the reals. Using the floor function, one can produce several explicit (yet impractical) formulas for prime numbers. See the article on prime numbers for a number of examples. The ceiling functionA closely related mathematical function is the ceiling function, which is defined as follows: for any given real number x, ceiling(x) is the smallest integer no less than x. For example, ceiling(2.3) = 3, ceiling(2) = 2 and ceiling(-2.3) = -2. The ceiling function is also denoted by <math>\lceil x \rceil<math>. It is easy to show the following:
and the following:
For any integer k, we also have the following equality:
If m and n are coprime positive integers, then
Beatty's theorem shows how every positive irrational number gives rise to a partition of the natural numbers into two sequences via the floor function. The operator (int) in CC and related programming languages have a feature called type casting which allows to turn a floating point value into an integer by prefixing it with Like the floor and ceiling function, this operation is not continuous, which can magnify rounding errors with disastrous consequences. For instance, The fractional partIf x is an irrational number, then the fractional parts nx mod 1, where n runs through the positive integers, are extremely evenly distributed in the open interval (0,1). This can be made precise in various ways, one of which states
for every continuous function f : [0,1] -> R (see limit (mathematics) and integration.) According to a general principle of diophantine approximation discovered by Hermann Weyl, that property is equivalent to something much easier to check in this case: namely that sums
for fixed integers k > 0 and taken over ranges
have estimates o(N). Because these are geometric progressions, that can be proved rather directly. The condition that x be irrational comes out to be that
bg:Функция скобка de:Gauklammer es:Funcin parte entera fr:Partie entire ja:端数処理 pl:Część całkowita ru:целая часть |
||
|
|
|
|
|
|
Copyright 2008 WordIQ.com - Privacy Policy
::
Terms of Use
:: Contact Us
:: About Us This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Floor function". |