Python cmath.log10() Método
Ejemplo
Encuentra el logaritmo en base 10 de un número complejo:
#Import cmath Library
import cmath
#print base-10 log value of
complex numbers
print (cmath.log10(2+ 3j))
print (cmath.log10(1+ 2j))
Definición y uso
El cmath.log10()
método devuelve el logaritmo en base 10 de un número complejo.
Hay un corte de rama, desde 0 a lo largo del eje real negativo hasta -∞, continuo desde arriba.
Sintaxis
cmath.log10(x)
Valores paramétricos
Parameter | Description |
---|---|
x | Required. Specifies the value to calculate the base-10 logarithm for. If the value is 0 or a negative number, it returns a ValueError. If the value is not a number, it returns a TypeError |
Detalles técnicos
Valor devuelto: | Un complex valor, que representa el logaritmo en base 10 de un número |
---|---|
Versión de Python: | 1.5 |