python math.sinh()方法,返回双曲正弦值
math.sinh()方法
math module中的sinh()方法,可获取参数指定值的双曲正弦值。
语法
sinh(x)
python源码对sinh()方法的介绍:
Return the hyperbolic sine of x.
参数
参数 | 描述 |
---|---|
x | 必须参数,real number,如int或float等类型 |
返回值
python浮点型float。
math.sinh()方法实例代码
>>> import math
>>> math.sinh(6)
201.71315737027922
>>> math.sinh('1')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: must be real number, not str