I believe that I have found a trigonometric expression for both the ceiling and floor function, and I seek confirmation that it is, indeed, correct.
Update.
$$\begin{align} \lfloor x \rfloor &= x - \frac12+f(x) \\[4pt] \lceil x \rceil &= x + \frac12+g(x) \end{align}$$ where $$\begin{align} f(x) &= \begin{cases} \frac12, & x\in\Bbb{Z} \\[4pt] 0, &x=\frac12n, n\in\Bbb{Z} \\[4pt] \frac1\pi \tan^{-1}(\cot(\pi x)), &\text{otherwise} \end{cases} \\[10pt] g(x) &= \begin{cases} -\frac12, & x\in\Bbb{Z} \\[4pt] 0, &x=\frac12n, n\in\Bbb{Z} \\[4pt] \frac1\pi \tan^{-1}(\cot(\pi x)), &\text{otherwise} \end{cases} \end{align}$$
Note that you have the identity $\tan\left(\frac{\pi}{2}-x\right)=\cot(x)$. Using this, your formula for the floor function is:
$$ \begin{split} \lfloor x \rfloor &= x-\frac{1}{2}+\frac{\arctan\left(\tan\left(\frac{\pi}{2}-\pi\cdot x\right)\right)}{\pi} \\ &=x-\frac{1}{2}+\frac{\frac{\pi}{2}-\pi\cdot x+n\pi}{\pi}, \text{ for }n\in\mathbb{Z} \\ &=x-\frac{1}{2}+\frac{1}{2}-x+n \\ &=n \end{split} $$
Then there is some $n\in \mathbb{Z}$ such that $n=\lfloor x \rfloor$. If, as usual, you insist that $-\pi\le \arctan(x) \le \pi$ this then forces:
$$ \begin{split} && -1\le \frac{1}{2}-x+n \le 1 \\ &\implies& -\frac{3}{2}\le n-x \le \frac{1}{2} \\ &\implies& x-\frac{3}{2} \le n \le x+\frac{1}{2} \end{split} $$
So the value for $n$ is close to $\lfloor x \rfloor$. I'm not sure how computers choose which value to pick for $\arctan$ but it appears to always pick the right one for your formula to work. I'm not sure it would be a good idea to use this formula in your work unless you know which value of $\arctan$ to pick to ensure that you get the right answer.