simplify log function