Python math.cosh()- Methode
Beispiel
Finden Sie den hyperbolischen Kosinus verschiedener Zahlen:
# 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))
Definition und Verwendung
Die math.cosh()
Methode gibt den hyperbolischen Kosinus einer Zahl zurück (entspricht (exp(number) + exp(-number)) / 2).
Syntax
math.cosh(x)
Parameterwerte
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
Rückgabewert: | Ein float Wert, der den hyperbolischen Kosinus einer Zahl darstellt |
---|---|
Python-Version: | 1.4 |