Python math.atanh() メソッド

Python math 模块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 模块Python math モジュール

その他の拡張