Replace broken log2 function; add a missing comment.