Added a log2 function.