Python math.cosh() 方法
定义和用法
math.cosh()
方法返回数的双曲余弦值。
实例
求不同数字的双曲余弦值:
# 导入 math 库 import math # 返回不同数的双曲余弦值 print (math.cosh(1)) print (math.cosh(8.90)) print (math.cosh(0)) print (math.cosh(1.52))
语法
math.cosh(x)
参数
参数 | 描述 |
---|---|
x |
必需。要计算双曲余弦的数字。 如果该值不是数字,它将返回 TypeError。 |
技术细节
返回值: | 浮点数值,代表数的双曲余弦值。 |
---|---|
Python 版本: | 1.4 |