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