RIGHT FLOOR (\rfloor commands in math mode. LaTeX has supported UTF-8 since 2018, so the Unicode characters can now be used directly. Larger versions arex and n and the set of integers ⌈x⌉=min{n∈ℤ∣n≥x}.
Since there is exactly one integer in a half-open interval of length one, for any real number n satisfying the equation
⌈x⌉=n may also be taken as the definition of floor and ceiling.
These formulas can be used to simplify expressions involving floors and ceilings.
n to the arguments affects the functions:
x and x1≤x2⇒⌊x1⌋≤⌊x2⌋,x1≤x2⇒⌈x1⌉≤⌈x2⌉.
Relations among the functions
edit
It is clear from the definitions that
n, both floor and ceiling functions are the identity:
⌊x⌋+⌊−x⌋={0if x∈ℤ−1if x∉ℤ,
⌊⌊x⌋⌋=⌊x⌋,⌈⌈x⌉⌉=⌈x⌉,{{x}}={x}.
The result of nested floor or ceiling functions is the innermost function:
n are integers and n is positive
m is positive
m = 2 these imply
m being positive)
m and m and m and ∑k=1n−1{kmn}=12(n−1).
Since the right-hand side of the general case is symmetrical in ⌊m1n⌋+⌊2mn⌋+⋯+⌊(n−1)mn⌋=⌊n1m⌋+⌊2nm⌋+⋯+⌊(m−1)nm⌋.
More generally, if ⌊x1n⌋+⌊m+xn⌋+⌊2m+xn⌋+⋯+⌊(n−1)m+xn⌋=⌊x1m⌋+⌊n+xm⌋+⌊2n+xm⌋+⋯+⌊(m−1)n+xm⌋.
This is sometimes called a reciprocity law.
Division by positive integers gives rise to an interesting and sometimes useful property. Assuming 0"}}'>m,n>0,
m≤⌊xn⌋⟹m≤xn⟹n≤xm⟹n≤⌊xm⌋⟹…⟹m≤⌊xn⌋,
keeping in mind that x greater than 0≤r≤d−1 is the remainder of dividing n, and arbitrary real numbers ⌊⌊xm⌋n⌋=⌊xmn⌋⌈⌈xm⌉n⌉=⌈xmn⌉.
Continuity and series expansions
edit
None of the functions discussed in this article are continuous, but all are piecewise linear: the functions {x} have discontinuities at the integers.
{x} are lower semi-continuous.
Since none of the functions discussed in this article are continuous, none of them have a power series expansion. Since floor and ceiling are not periodic, they do not have uniformly convergent Fourier series expansions. The fractional part function has Fourier series expansion
y fixed and y/2, rather than to ⌊x⌋=x−12+1π∑k=1∞sin(2πkx)k
for y, the modulo operation, denoted by y. This definition can be extended to real y ≠ 0, by the formula
y, i.e.,
if y is negative,
y."}}'>0≥xmody>y.
Quadratic reciprocity
edit
Gauss's third proof of quadratic reciprocity, as modified by Eisenstein, has two basic steps.
Let m=12(p−1), ⌊qp⌋+⌊2qp⌋+⋯+⌊mqp⌋+⌊pq⌋+⌊2pq⌋+⋯+⌊npq⌋=mn.
Combining these formulas gives quadratic reciprocity in the form
(2p)=(−1)⌊p+14⌋,(3p)=(−1)⌊p+16⌋.
For an arbitrary real number rpi(x)=⌊x+12⌋=⌈12⌊2x⌋⌉;
rounding towards negative infinity is given as
sgn is the sign function), and rounding towards even can be expressed with the more cumbersome
14(2x−1).
Rounding a real number Q(x)=Δ⋅⌊xΔ+12⌋,
The number of digits in base ⌊logbk⌋+1=⌈logb(k+1)⌉.
Number of strings without repeated characters
edit
The number of possible strings of arbitrary length that doesn't use any character twice is given byn > 0 is the number of letters in the alphabet (e.g., 26 in English)
For ζ(s)=s∫−∞∞e−σω(⌊eω⌋−eω)e−itωdω.
The floor function appears in several formulas characterizing prime numbers. For example, since
∑m=1∞(⌊nm⌋−⌊n−1m⌋)=2.
One may also give formulas for producing the prime numbers. For example, let ''n''</sub>"}},"i":0}}]}'/>pn be the α by the sum
θ = 1.3064... (Mills' constant) with the property that
⌊2ω⌋,⌊22ω⌋,⌊222ω⌋,…
are all prime.
Let π(n)=∑j=2n⌊1∑k=2j⌊⌊jk⌋kj⌋⌋.
None of the formulas in this section are of any practical use.