Phương thức Python math.tanh()
Ví dụ
Tìm tang hyperbol 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))
Hãy tự mình thử »Định nghĩa và cách sử dụng
Phương thức math.tanh()
trả về tang hyperbol 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ả về: | Một giá trị float , biểu thị tang hyperbol của một số |
---|---|
Phiên bản Python: | 1.4 |