Changed func log to log_err. Log is used in math.h