FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://en.wikipedia.org/wiki/Ceiling_function

Floor and ceiling functions

Contents
Notation
    Equivalences
    Relations among the functions
    Continuity and series expansions
    Quadratic reciprocity
    Rounding
    Number of digits
    Number of strings without repeated characters
    Riemann zeta function (ζ)
    Formulas for prime numbers
    Solved problems

Floor and ceiling functions
Floor function
Ceiling function

In mathematics, the floor function is the function that takes a real number x as input and returns the greatest integer less than or equal to floor(x). Similarly, the ceiling function returns the least integer greater than or equal to ceil(x).

For example, for floor: ⌈2.4⌉ = 3, and x, and was historically denoted ⌊n⌋ = ⌈n⌉ = n.

Although x, and thus produce graphs that appear exactly alike, they differ when ⌊2.0001 + 1⌋ = ⌈2.0001⌉ = 3. However, if ⌈2⌉ = 2.

Examples
x Floor {x}
2 2 2 0
2.0001 2 3 0.0001

Notation

edit

The integral part or integer part of a number (⌊x⌋ and ⟧x⟦ or x and defined by the formula

U+2308⌈LEFT CEILING (U+2309⌉⌊, ⌊)
  • 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.

    Equivalences

    edit

    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⌋.

    Rounding

    edit

    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⌋,

    Number of digits

    edit

    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)

  • the falling factorial e = 2.718... is Euler's number
  • For p a positive prime number. The exponent of the highest power of n in base γ = 0.57721 56649 ... that involve the floor and ceiling, e.g. γ=∑k=2∞(−1)k⌊log2k⌋k=12−13+2(14−15+16−17)+3(18−⋯−115)+⋯

    Riemann zeta function (ζ)

    edit

    The fractional part function also shows up in integral representations of the Riemann zeta function. It is straightforward to prove (using integration by parts) that if ∑a<n≤bφ(n)=∫abφ(x)dx+∫ab({x}−12)φ′(x)dx+({a}−12)φ(a)−({b}−12)φ(b).

    Letting a and ζ(s)=s∫1∞12−{x}xs+1dx+1s−1+12.

    This formula is valid for all {x} can be used to extend the zeta function to the entire complex plane and to prove its functional equation.

    For ζ(s)=s∫−∞∞e−σω(⌊eω⌋−eω)e−itωdω.

    In 1947 van der Pol used this representation to construct an analogue computer for finding roots of the zeta function.

    Formulas for prime numbers

    edit

    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.

    Solved problems

    edit

    Ramanujan submitted these problems to the Journal of the Indian Mathematical Society.

    If ⌊12+n+12⌋=⌊12+n+14⌋,

  • 3k−2k⌊(32)k⌋>2k−⌊(32)k⌋−2 ?

    Mahler has proved there can only be a finite number of such x by "LaTeX News, Issue 28" (PDF; 379 KB). The LaTeX Project. April 2018. Retrieved 27 July 2024.

  • ↑ Graham, Knuth, & Patashink, Ch. 3
  • ↑ Graham, Knuth, & Patashnik, p. 73
  • ↑ Graham, Knuth, & Patashnik, p. 85
  • ↑ Graham, Knuth, & Patashnik, p. 85 and Ex. 3.15
  • ↑ Graham, Knuth, & Patashnik, Ex. 3.12
  • ↑ Graham, Knuth, & Patashnik, p. 94.
  • ↑ Graham, Knuth, & Patashnik, p. 94
  • ↑ Problems and Solutions, The College Mathematics Journal, 56:4
  • ↑ Graham, Knuth, & Patashnik, p. 71, apply theorem 3.10 with ⁠x/m⁠ as input and the division by n as function
  • ↑ Titchmarsh, p. 15, Eq. 2.1.7
  • ↑ Lemmermeyer, § 1.4, Ex. 1.32–1.33
  • ↑ Hardy & Wright, §§ 6.11–6.13
  • ↑ Lemmermeyer, p. 25
  • ↑ On-Line Encyclopedia of Integer Sequences</span>"}]],"parts":[{"template":{"target":{"wt":"OEIS el ","href":"./Template:OEIS_el"},"params":{"1":{"wt":"A000522"},"2":{"wt":"Total number of arrangements of a set with n elements: a(n) = Sum_{k=0..n} n!/k!."}},"i":0}}]}'>OEISsequenceA000522(Total number of arrangements of a set with n elements: a(n) = Sum_{k=0..n} n!/k!.) (See Formulas.)
  • ↑ Hardy & Wright, Th. 416
  • ↑ Graham, Knuth, & Patashnik, pp. 77–78
  • ↑ These formulas are from the Wikipedia article Euler's constant, which has many more.
  • ↑ Titchmarsh, p. 13
  • ↑ Titchmarsh, pp.14–15
  • ↑ Crandall & Pomerance, p. 391
  • ↑ Crandall & Pomerance, Ex. 1.3, p. 46. The infinite upper limit of the sum can be replaced with n. An equivalent condition is n > 1 is prime if and only if Mahler, Kurt (1957). "On the fractional parts of the powers of a rational number II". Mathematika. 4 (2): 122–124. doi:10.1112/S0025579300001170.
  • ↑ Sutter, Herb; Alexandrescu, Andrei. C++ Coding Standards: 101 Rules, Guidelines, and Best Practices. Addison-Wesley 2004. ISBN 978-0-321-11358-0. ch. 8, 9
  • ↑ floor</code> function"},"url":{"wt":"http://en.cppreference.com/w/cpp/numeric/math/floor"},"access-date":{"wt":"5 December 2010"}},"i":0}}]}'/>"C++ reference of floor function". Retrieved 5 December 2010.
  • ↑ ceil</code> function"},"url":{"wt":"http://en.cppreference.com/w/cpp/numeric/math/ceil"},"access-date":{"wt":"5 December 2010"}},"i":0}}]}'/>"C++ reference of ceil function". Retrieved 5 December 2010.
  • ↑ "Math (Java SE 9 & JDK 9 )". docs.oracle.com. Retrieved 20 November 2018.
  • ↑ "PHP manual for ceil function". Retrieved 18 July 2013.
  • ↑ floor</code> function"},"url":{"wt":"http://php.net/manual/function.floor.php"},"access-date":{"wt":"18 July 2013"}},"i":0}}]}'/>"PHP manual for floor function". Retrieved 18 July 2013.
  • ↑ "Vocabulary". J Language. Retrieved 6 September 2011.
  • ↑ "Documentation/How Tos/Calc: INT function". Retrieved 29 October 2021.
  • ↑ Crandall, Richard; Pomerance, Carl (2001), Prime Numbers: A Computational Perspective, New York: Springer, ISBN 0-387-94777-9
  • Higham, Nicholas J., Handbook of writing for the mathematical sciences, SIAM (Society for Industrial and Applied Mathematics), p. 25, ISBN 0-89871-420-6
  • ISO/IEC. ISO/IEC 9899::1999(E): Programming languages — C (2nd ed), 1999; Section 6.3.1.4, p. 43.
  • Ramanujan, Srinivasa (2000), Collected Papers, Providence RI: AMS / Chelsea, ISBN 978-0-8218-2076-6
  • "Floor function", Encyclopedia of Mathematics, EMS Press, 2001 [1994]
  • Štefan Porubský, "Integer rounding functions" Archived 23 May 2009 at the Wayback Machine, Interactive Information Portal for Algorithmic Mathematics, Institute of Computer Science of the Czech Academy of Sciences, Prague, Czech Republic, retrieved 24 October 2008

  • View original on Wikipedia | Back | FazBrowse Home