Logarithm for negative numbers