Python cmath.tanh() Methode
Voorbeeld
Vind de hyperbolische tangens van een complex getal:
#Import cmath Library
import cmath
#Return the hyperbolic tangent
of a complex number
print (cmath.tanh(2 + 3j))
Definitie en gebruik
De cmath.tanh()
methode retourneert de tangens hyperbolicus van een complex getal.
Syntaxis
cmath.tanh(x)
Parameterwaarden
Parameter | Description |
---|---|
x | Required. A number to find the hyperbolic tangent of. If the value is not a number, it returns a TypeError |
Technische details
Winstwaarde: | Een complex waarde, die de hyperbolische tangens van een complex getal voorstelt |
---|---|
Python-versie: | 1.5 |