Calculates the log base 10 of a number and returns the result as a double.