Python math.cosh() Metode
Contoh
Tentukan kosinus hiperbolik dari bilangan yang berbeda:
# 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))
Definisi dan Penggunaan
Metode math.cosh()
ini mengembalikan kosinus hiperbolik suatu angka (setara dengan (exp(angka) + exp(-angka)) / 2).
Sintaksis
math.cosh(x)
Nilai Parameter
Parameter | Description |
---|---|
x | Required. A number to find the hyperbolic cosine of. If the value is not a number, it returns a TypeError |
Detail Teknis
Nilai Kembali: | Nilai float , yang mewakili kosinus hiperbolik suatu bilangan |
---|---|
Versi Python: | 1.4 |