Home >>Python cmath Module >Python cmath.log10() Method

Python cmath.log10() Method

Python cmath.log10() Method

Python cmath.log10() method in python is used to returns the base-10 logarithm of a given complex number.

Syntax:
cmath.log10(x)

Parameter Values

Parameter Description
x It is a Required parameter used to specifies the value to calculate the base-10 logarithm
Here is an Example of Python cmath.log10() Method:

import cmath  
print (cmath.log10(4+ 3j))
print (cmath.log10(2+ 2j))

Output:
(0.6989700043360187+0.2794689806475475j)
(0.4515449934959718+0.3410940884604603j)
Example 2:

import cmath 
x = cmath.log10(18) 
print(x)

Output:
(1.2552725051033058+0j)

No Sidebar ads