x | \(\cos^{-1}\)を計算したい実数。 The real number for which \(\cos^{-1}\) is needed. |
条件 Condition |
戻り値/動作 Return value or behaviour of the function |
丸め誤差の範囲を有意に超えて\(|x|>1.0\)と見なせる場合
(関数doublecmpにより判定) It is regarded that \(|x|>1.0\), even after taking into account rounding errors (judged by function doublecmp) |
プログラムをエラー終了する。 The program finishes as an error. |
丸め誤差の範囲内で\(x=1.0\)と見なせる場合
(関数doublecmpにより判定) It is regarded that \(x=1.0\), taking into account rounding errors (judged by function doublecmp) |
0.0 |
丸め誤差の範囲内で\(x=-1.0\)と見なせる場合
(関数doublecmpにより判定) It is regarded that \(x=-1.0\), taking into account rounding errors (judged by function doublecmp) |
\(\pi\) |
上記以外の場合 The other cases |
\(\cos^{-1}(x)\) [rad] 範囲は\([0,\pi]\)とする。 The range is between 0 and \(\pi\). |