Latest web development tutorials

python3 ASIN()関数

python3デジタル python3デジタル


説明

ASIN()のxラジアンのアークサインを返します。


文法

次の構文ASIN()メソッドです。

import math

math.asin(x)

注:ASIN()は直接アクセスできません、あなたは数学のモジュールをインポートする必要があり、その後、数学静的オブジェクトによってメソッドを呼び出します。


パラメータ

  • X - -1と1の間の値。 xが1より大きい場合は、エラーが発生します。

戻り値

xラジアンのアークサインを返します。


以下は、ASIN()メソッドの使用例を示します。

#!/usr/bin/python3
import math

print ("asin(0.64) : ",  math.asin(0.64))
print ("asin(0) : ",  math.asin(0))
print ("asin(-1) : ",  math.asin(-1))
print ("asin(1) : ",  math.asin(1))

上の例の出力を実行した後です。

asin(0.64) :  0.694498265626556
asin(0) :  0.0
asin(-1) :  -1.5707963267948966
asin(1) :  1.5707963267948966

python3デジタル python3デジタル