Python math.tanh()วิธี การ
ตัวอย่าง
ค้นหาไฮเปอร์โบลิกแทนเจนต์ของจำนวนต่างๆ:
# Import math Library
import math
# Return the hyperbolic tangent of
different numbers
print(math.tanh(8))
print(math.tanh(1))
print(math.tanh(-6.2))
ความหมายและการใช้งาน
วิธี การmath.tanh()
ส่งคืนไฮเปอร์โบลิกแทนเจนต์ของตัวเลข
ไวยากรณ์
math.tanh(x)
ค่าพารามิเตอร์
Parameter | Description |
---|---|
x | Required. A number to find the hyperbolic tangent of. If the value is not a number, it returns a TypeError |
รายละเอียดทางเทคนิค
คืนมูลค่า: | ค่า ที่float แทนเจนต์ไฮเปอร์โบลิกของตัวเลข |
---|---|
เวอร์ชันหลาม: | 1.4 |