Phương thức toán học Python.tanh ()
Thí dụ
Tìm tiếp tuyến của hypebol của các số khác nhau:
# 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))
Định nghĩa và Cách sử dụng
Phương math.tanh()
thức này trả về tiếp tuyến hypebol của một số.
Cú pháp
math.tanh(x)
Giá trị tham số
Parameter | Description |
---|---|
x | Required. A number to find the hyperbolic tangent of. If the value is not a number, it returns a TypeError |
Chi tiết kỹ thuật
Giá trị trả lại: | Một float giá trị, đại diện cho tiếp tuyến hypebol của một số |
---|---|
Phiên bản Python: | 1,4 |