fix log2 of logical