Formula for the floor function I found the following formula for the floor function:
$$\lfloor x \rfloor = -\frac12+x+\frac{\arctan(\cot\pi x)}{\pi}$$
for all $x$ not an integer.
My question is where I can find the proof of this formula.

The arctangent function is multivalued - when thought of as a function of a complex variable, its domain is a Riemann surface with multiple sheets joined at branch cuts in the complex plane. So your formula is not well-defined unless you specify which branch you are considering to be the principal branch. The most natural way to specify the usual principal branch of the arctangent function basically uses the idea of the floor function anyway, so your formula "for" the floor function is correct but somewhat circular.
