Methode Python math.tanh()
Voorbeeld
Vind de hyperbolische tangens van verschillende getallen:
# Import math Library
import math
# Return the hyperbolic tangent of
different numbers
print(math.tanh(8))
print(math.tanh(1))
print(math.tanh(-6.2))
Definitie en gebruik
De math.tanh()
methode retourneert de hyperbolische tangens van een getal.
Syntaxis
math.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 float waarde, die de hyperbolische tangens van een getal voorstelt |
---|---|
Python-versie: | 1.4 |