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))
定義と使用法
このmath.tanh()
メソッドは、数値の双曲線正接を返します。
構文
math.tanh(x)
パラメータ値
Parameter | Description |
---|---|
x | Required. A number to find the hyperbolic tangent of. If the value is not a number, it returns a TypeError |
技術的な詳細
戻り値: | 数値の双曲線正接を表すfloat 値 |
---|---|
Pythonバージョン: | 1.4 |