Python math.acos()メソッド
例
異なる数値のアークコサインを返します。
# Import math Library
import math
# Return the arc cosine
of numbers
print(math.acos(0.55))
print(math.acos(-0.55))
print(math.acos(0))
print(math.acos(1))
print(math.acos(-1))
定義と使用法
このmath.acos()
メソッドは、数値のアークコサイン値を返します。
注:渡されるパラメーターは、math.acos()
-1から1の間にある必要があります。
ヒント: math.acos(-1)
PIの値を返します。
構文
math.acos(x)
パラメータ値
Parameter | Description |
---|---|
x | Required. A number in the range -1 to 1. If x is not a number, it returns a TypeError |
技術的な詳細
戻り値: | 数値のアークコサインを表すfloat 値 |
---|---|
Pythonバージョン: | 1.4 |