Yesterday, nobody contributed anything.  :-(
The official answer is: floor(ln(2 ^ (-x)))