Floor Function

Author

Eric W. Weisstein
March 22, 2008

This notebook downloaded from http://mathworld.wolfram.com/notebooks/SpecialFunctions/FloorFunction.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/FloorFunction.html.

©2008 Wolfram Research, Inc. except for portions noted otherwise

Plots

<<Utilities`Plot`

Real Axis

PlotDiscontinuous[Floor[x],{x,Sequence@@Range[-4,4]},AxesLabel->TraditionalForm/@{x,Floor[x]},PlotRange->All]

PlotDiscontinuous[Floor[x],{x,-4.9,Sequence@@Range[-4,4],4.9},AxesLabel->TraditionalForm/@{x,Floor[x]},PlotRange->All]

Complex Plane

ComplexPlot3D[Floor[z],{z,-3,3}]

ComplexContourPlot[Floor[z],{z,-3,3}]//Timing

Make Floor Continuous

Expression from Sasha

Only true on real axis

Floor[z_]:>z-1/Pi ArcTan[Tan[Pi z-Pi/2]]+(1/2) ((-1)^(Floor[-z]+Floor[z]))

Subtract@@@Table[{Floor[z],
z-1/Pi ArcTan[Tan[Pi z-Pi/2]]+(1/2) ((-1)^(Floor[-z]+Floor[z]))}/.z->RandomComplex[2(I+1){-1,1}],{20}]

Subtract@@@Table[{Floor[z],
z-1/Pi ArcTan[Tan[Pi z-Pi/2]]+(1/2) ((-1)^(Floor[-z]+Floor[z]))}/.z->RandomReal[2{-1,1}],{20}]//Chop//Union

Identities

n+⌊x⌋=⌊n+x⌋

Show[GraphicsArray[
Table[
Plot[Floor[x]+n-Floor[x+n],{x,-10,10},PlotStyle->RGBColor[1,0,0],DisplayFunction->Identity],{n,-2,2}]]]

Show[GraphicsArray[
Table[
Plot[Floor[x]+n-Floor[x+n],{x,-10,10},PlotStyle->RGBColor[1,0,0],DisplayFunction->Identity],{n,-1.5,2,1}]]]

Sums

(∑_(n=1)^∞)(1/(k^n))⌊(n/m)⌋==(k/((k-1) ((k^m)-1)))

V6

Table[{Sum[Floor[n/m]/k^n,{n,∞}],k/(k-1)/(k^m-1)},{m,5},{k,2,5}]

Apply[Subtract,%,{2}]

V7

Sum[(1/(k^n))Floor[(n/m)],{n,∞}]//InputForm

Subtract@@@Table[{Sum[Floor[n/m]/k^n,{n,∞}],k/(k-1)/(k^m-1)}/.{k->RandomInteger[{1,10}],m->RandomInteger[{1,10}]},{10}]//Chop//Union

Subtract@@@Table[{Sum[Floor[n/m]/k^n,{n,∞}],k/(k-1)/(k^m-1)}/.{k->RandomReal[{1,10}],m->RandomInteger[{1,10}]},{10}]//Chop//Union

Subtract@@@Table[{Sum[Floor[n/m]/k^n,{n,∞}],k/(k-1)/(k^m-1)}/.{k->RandomReal[{1,10}],m->RandomReal[{1,10}]},{10}]//Chop//Union

(∑_n^∞)(z^n) ⌊a n⌋==(∑_(n=0)^∞)(((((-1))^n) ((z^(Subscript[q, n])) (z^(Subscript[q, n+1]))))/((1-(z^(Subscript[q, n]))) (1-(z^(Subscript[q, n+1])))))+(((Subscript[p, 0]) z)/(((1-z))^2))

Sum[Floor[n a](z^n),{n,∞}]

Sum[(((-1))^n)(((z^(Subscript[q, n]))(z^(Subscript[q, n+1])))/((1-(z^(Subscript[q, n])))(1-(z^(Subscript[q, n+1]))))),{n,0,∞}]