math.atanh(x)

本页内容
上一节: Ref_math_atan2 下一节: Ref_math_ceil

Python math.atanh() 方法

Python math 模块

Python math.atanh(x) 返回 x 的反双曲正切值。

math.atanh(x) 的参数介于 -0.99 到 0.99 之间。

Python 版本: 2.6

语法

math.atanh() 方法语法如下:


示例

math.atanh(x)

参数说明:

  • x -- 必需,介于 -0.99 和 0.99 之间的正数或负数。 如果 x 不是数字,则返回 TypeError.

返回值

返回一个浮点数,表示 x 的反双曲正切值。

==

以下实例返回数字的双曲正切值:


示例

# 导入 math 包

import math

# 输出双曲正切值

print(math.atanh(0.59))

print(math.atanh(-0.12))

输出结果:


示例

0.6776660677579618
-0.12058102840844402

Python math 模块

上一节: Ref_math_atan2 下一节: Ref_math_ceil
此页面最后编辑于2022年8月17日 (星期三) 21:51。