Methode Python math.cosh()
Voorbeeld
Vind de hyperbolische cosinus van verschillende getallen:
# Import math Library
import math
# Return the hyperbolic cosine of
different numbers
print (math.cosh(1))
print (math.cosh(8.90))
print (math.cosh(0))
print (math.cosh(1.52))
Definitie en gebruik
De math.cosh()
methode retourneert de cosinus hyperbolicus van een getal (equivalent aan (exp(getal) + exp(-getal)) / 2).
Syntaxis
math.cosh(x)
Parameterwaarden
Parameter | Description |
---|---|
x | Required. A number to find the hyperbolic cosine of. If the value is not a number, it returns a TypeError |
Technische details
Winstwaarde: | Een float waarde, die de cosinus hyperbolicus van een getal voorstelt |
---|---|
Python-versie: | 1.4 |