I'm looking for a function $m(x,y)$ that smoothly approximates $x \bmod y$, and I'm assuming there would be some $n$ or $\varepsilon$ in the body of $m(x,y)$ that defines the degree of approximation such that as $n$ goes to infinity or $\varepsilon$ goes to zero, $$ m(x,y)= x \bmod y. $$
I've looked at, for example, $\sin(x/y)$ and have been trying to figure out ways to make $\sin(x)$ more "steep" so that I can apply such techniques to $\sin(x/y)$ in order to perhaps more closely approximate $x \bmod y$.
The analogy I'm looking at is the approximation of $\mid x\mid$ as $\sqrt{x^2 + \varepsilon)}$ where epsilon is some small quantity.
Does a similarly smooth function exist for $x \bmod y$?


x \bmod yin MathJax; this typesets to "$x \bmod y$". It's a known, legitimate binary operator on two integers. – David K Oct 26 '17 at 21:48