Python math.cosh() Methode
Python math.cosh(x)Gibt den hyperbolischen Kosinus von x zurück, äquivalent zu (exp(number) + exp(-number)) / 2.
Python-Version: 1.4
Syntax
Die Syntax der math.cosh()-Methode lautet wie folgt:
math.cosh(x)
Parameter description:
- x-- Erforderlich. Eine positive oder negative Zahl. Wenn x keine Zahl ist, wird TypeError zurückgegeben.
Rückgabewert
Gibt eine Gleitkommazahl zurück, die den hyperbolischen Kosinus einer Zahl darstellt.
Beispiele
Das folgende Beispiel gibt die hyperbolischen Kosinuswerte verschiedener Zahlen zurück:
Beispiel
# math-Paket importieren
import math
# Hyperbolischen Kosinuswert ausgeben
print (math.cosh(1))
print (math.cosh(8.90))
print (math.cosh(0))
print (math.cosh(1.52))
import math
# Hyperbolischen Kosinuswert ausgeben
print (math.cosh(1))
print (math.cosh(8.90))
print (math.cosh(0))
print (math.cosh(1.52))
Ausgabe:
1.5430806348152437 3665.986837772461 1.0 2.395468541047187Weitere Erweiterungen
Python-Modul math