Replaced math library for log2