Python math.cosh()เมธอด
ตัวอย่าง
ค้นหาไฮเปอร์โบลิกโคไซน์ของจำนวนต่างๆ:
# 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))
ความหมายและการใช้งาน
math.cosh()
เมธอดจะคืนค่าไฮเปอร์โบลิกโคไซน์ของตัวเลข (เทียบเท่ากับ (exp(number) + exp(-number))) / 2 )
ไวยากรณ์
math.cosh(x)
ค่าพารามิเตอร์
Parameter | Description |
---|---|
x | Required. A number to find the hyperbolic cosine of. If the value is not a number, it returns a TypeError |
รายละเอียดทางเทคนิค
คืนมูลค่า: | ค่า ที่float แทนไฮเปอร์โบลิกโคไซน์ของจำนวน |
---|---|
เวอร์ชันหลาม: | 1.4 |