Python math.cosh() Metode
Voorbeeld
Vind die hiperboliese cosinus van verskillende getalle:
# 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))
Definisie en gebruik
Die math.cosh()
metode gee die hiperboliese cosinus van 'n getal terug (gelykstaande aan (exp(getal) + exp(-getal)) / 2).
Sintaksis
math.cosh(x)
Parameterwaardes
Parameter | Description |
---|---|
x | Required. A number to find the hyperbolic cosine of. If the value is not a number, it returns a TypeError |
Tegniese besonderhede
Terugkeerwaarde: | 'n float Waarde, wat die hiperboliese cosinus van 'n getal voorstel |
---|---|
Python weergawe: | 1.4 |