Overview:
The function returns the logarithm of a given number for a given base. When base is not given the function uses e as the base and returns the natural logarithm.
Example:
# Example Python program that uses num = 1000000 base = 5 base = 2 logVal = math.log(num) |
Output:
Logarithm of 1000000 base 10 : 5 Logarithm of 1000000 base 5 : 8 Logarithm of 1000000 base 2 : 19 Natural logarithm of 1000000 : 13 |