Método Python math.cosh()
Ejemplo
Encuentra el coseno hiperbólico de diferentes números:
# 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))
Definición y uso
El math.cosh()
método devuelve el coseno hiperbólico de un número (equivalente a (exp(número) + exp(-número)) / 2).
Sintaxis
math.cosh(x)
Valores paramétricos
Parameter | Description |
---|---|
x | Required. A number to find the hyperbolic cosine of. If the value is not a number, it returns a TypeError |
Detalles técnicos
Valor devuelto: | Un float valor, que representa el coseno hiperbólico de un número. |
---|---|
Versión de Python: | 1.4 |