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