Solution
There are many solutions, but here's a nice animated family of them. Click the bottom right to view+edit.
$$
f(x) = \begin{cases}
0 & x = 0 \\
x \cdot c & \lfloor\log_{c}\lvert x\rvert\rfloor < 1 \pmod{2} \\
\frac{-x}{c} & \text{otherwise} \\
\end{cases}
$$