Python cmath.tanh() Metode
Contoh
Tentukan tangen hiperbolik dari bilangan kompleks:
#Import cmath Library
import cmath
#Return the hyperbolic tangent
of a complex number
print (cmath.tanh(2 + 3j))
Definisi dan Penggunaan
Metode cmath.tanh()
ini mengembalikan tangen hiperbolik dari bilangan kompleks.
Sintaksis
cmath.tanh(x)
Nilai Parameter
Parameter | Description |
---|---|
x | Required. A number to find the hyperbolic tangent of. If the value is not a number, it returns a TypeError |
Detail Teknis
Nilai Kembali: | Nilai complex , yang mewakili tangen hiperbolik dari bilangan kompleks |
---|---|
Versi Python: | 1.5 |