/* -*- MaTX -*- * * 【名前】 * acos() - 逆余弦 * * 【形式】 * y = acos(x) * (Real |Real|Complex) y; * (Integer|Real|Complex) x; * * Y = acos(X) * Array Y; * Array X; * * 【機能説明】 * acos(x)は,スカラ型(整数, 実数, 複素数) x の逆余弦を求める。 * 角度はラジアンで計算される。x が実数のとき, * * -1 <= x <= 1 * * の範囲に対し,acos(x) は * * 0 <= acos(x) <= PI * * の範囲の実数となる。 * acos(X)は,配列 X の各成分の逆余弦からなる配列 Y を求める。 * Y の大きさは X の大きさと同じ。 * * 【アルゴリズム】 * i = (0,1) * acos(z) = - i*log(z + i*sqrt(1 - z*z)) * * 【例題】 * >> y = acos(0.5) * y = 1.0472 * * 範囲 -1 <= x <= 1 のacos(x)のグラフを表示する。 * * >> x = [-1:0.05:1]; * >> mgplot(1, x, acos(x), {"acos(x)"}); * * 【関連項目】 * asin(), atan(), asinh(), acosh(), atanh() */