Home >>Python cmath Module >Python cmath.log() Method
Python cmath.log() method in python is used to returns the natural logarithm of a complex value with base e. with two arguments it returns logarithm first argument (x) with the base of the second argument (base).
Syntax:cmath.log(x, base)
Parameter | Description |
---|---|
X | It is Required parameter used to Specifies the value to calculate the logarithm |
Base | It is Optional parameter to use the logarithm base. Default value is 'e' |
import cmath
print (cmath.log(3+ 1.3j))
print (cmath.log(2, 4j))
import cmath
tpoint = cmath.log(2)
print(tpoint)