Yesterday, the best answer is: floor((log2(-x)+1)^2).  (Contributed by unnamed. Good Job!)