fix linear version of log2 as well