Is the use of $\lfloor x\rfloor$ legitimate to correct discontinuities?
In functions like $\tan^{-1}(a \tan(x))$, the angle wraps and the result is discontinuous.
Is it legitimate to redefine the equation as in $\tan(a \tan^{-1}(x)) + \pi\lfloor \pi x + \frac{1}{2} \rfloor \mathop{\rm sgn}(a)$ to keep it continuous? Or is it better to write it $\tan(a \tan^{-1}(x)) + (x - \tan^{-1}(\tan(x))) \mathop{\rm sgn}(a)$, or some other way–or should this never be corrected in the first place?
I realize this example is rather trivial due to the multivalued nature of the arctangent. Here is one that is not so trivial: the arc length of the cycloid.
Unless I'm missing something, the problem with simply calculating integral for the arc length $\int \sqrt{2 - 2\cos(t)} dt = 2 \int |\sin(\frac{t}{2})| dt = 4-4\cos(\frac{t}{2})\mathop{\rm sgn}(\sin(\frac{t}{2}))$ is that it jumps back down to zero every $2\pi$. This could be corrected in one of the above ways. If left alone it is simply incorrect except in $0 < t < 2\pi$.
Now Wolfram|Alpha gives a terribly convoluted function for it. How did W|A redefine the process to come out correct for all $t$ (not to mention so convoluted)? Is this more natural or otherwise more legitimate than simply adding a floor function to it?
In other words: is there a mathematical reason to prefer one method over another?