Python/ref math tanh
来自菜鸟教程
<languages />
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))
定义和用法
The
math.tanh()
方法返回数字的双曲正切。
句法
math.tanh(x)
参数值
| 参数 | 描述 |
|---|---|
| x | 需要。查找双曲正切的数字。如果该值不是数字,则返回TypeError |
技术细节
| 返回值: | A
|
| Python版本: | 1.4 |