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