Yesterday, nobody contributed anything. :-(
The official answer is:
x - abs(floor(x - 4 * x ^ 4)) + -1