Floor Function

DOWNLOAD Mathematica Notebook FloorFunction

The floor function |_x_|, also called the greatest integer function or integer value (Spanier and Oldham 1987), gives the largest integer less than or equal to x. The name and symbol for the floor function were coined by K. E. Iverson (Graham et al. 1994).

Unfortunately, in many older and current works (e.g., Honsberger 1976, p. 30; Steinhaus 1999, p. 300; Shanks 1993; Ribenboim 1996; Hilbert and Cohn-Vossen 1999, p. 38; Hardy 1999, p. 18), the symbol [x] is used instead of |_x_| (Graham et al. 1994, p. 67). In fact, this notation harks back to Gauss in his third proof of quadratic reciprocity in 1808. However, because of the elegant symmetry of the floor function and ceiling function symbols |_x_| and [x], and because [x] is such a useful symbol when interpreted as an Iverson bracket, the use of [x] to denote the floor function should be deprecated. In this work, the symbol [x] is used to denote the nearest integer function since it naturally falls between the |_x_| and [x] symbols.

FloorReImAbs
Min Max
Re
Im Powered by webMathematica

The floor function is implemented in the Wolfram Language as Floor[z], where it is generalized to complex values of z as illustrated above.

Since usage concerning fractional part/value and integer part/value can be confusing, the following table gives a summary of names and notations used. Here, S&O indicates Spanier and Oldham (1987).

notationnameS&OGraham et al. Wolfram Language
[x]ceiling function--ceiling, least integerCeiling[x]
mod(m,n)congruence----Mod[m, n]
|_x_|floor functionInt(x)floor, greatest integer, integer partFloor[x]
x-|_x_|fractional valuefrac(x)fractional part or {x}SawtoothWave[x]
sgn(x)(|x|-|_|x|_|)fractional partFp(x)no nameFractionalPart[x]
sgn(x)|_|x|_|integer partIp(x)no nameIntegerPart[x]
nint(x)nearest integer function----Round[x]
m\nquotient----Quotient[m, n]

The floor function satisfies the identity

 |_x+n_|=|_x_|+n
(1)

for all integers n.

A number of geometric-like sequences with a floor function in the numerator can be done analytically. For instance, sums of the form

 sum_(n=1)^infty(|_nx_|)/(k^n)
(2)

can be done analytically for rational x. For x=1/m a unit fraction,

 sum_(n=1)^inftyk^(-n)|_n/m_|=k/((k-1)(k^m-1)).
(3)

Sums of this form lead to Devil's staircase-like behavior.

For irrational alpha>0, continued fraction convergents p_n/q_n, and epsilon_n=q_nalpha-p_n,

 |_nalpha+epsilon_N_|={|_nalpha_|   for n<q_(N+1); |_nalpha_|+(-1)^N   for n=q_(N+1)
(4)

(Borwein et al. 2004, p. 12). This leads to the rather amazing result relating sums of the floor function of multiples of alpha to the continued fraction of alpha by

 sum_(n=1)^infty|_nalpha_|z^n=(p_0z)/((1-z)^2)+sum_(n=0)^infty(-1)^n(z^(q_n)z^(q_(n+1)))/((1-z^(q_n))(1-z^(q_(n+1))))
(5)

(Mahler 1929; Borwein et al. 2004, p. 12).

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.