Yesterday, nobody contributed anything.  :-(
The official answer is: tan(abs(floor(-(2 * x))))