メインコンテンツ

cordicasin

逆正弦の CORDIC ベース近似

説明

theta = cordicasin(x) は、CORDIC 近似に基づく x の逆正弦を返します。

theta = cordicasin(x, niters) は、CORDIC アルゴリズムの niters 反復を実行する x の逆正弦を返します。

すべて折りたたむ

CORDIC の実装を使用して固定小数点 fi オブジェクトの逆正弦を計算します。

a = fi(-1:.1:1,1,16);
b = cordicasin(a);
plot(a, b);
title('Inverse CORDIC Sine');

Figure contains an axes object. The axes object with title Inverse CORDIC Sine contains an object of type line.

CORDIC 実装を使用して fi オブジェクト逆正弦を求め、CORDIC カーネルで実行すべき反復回数を指定します。さまざまな反復回数で逆正弦の CORDIC 近似をプロットします。

a = fi(-1:.1:1,1,16);
for i = 5:5:20
    b = cordicasin(a,i);
    plot(a,b);
    hold on;
end
legend('5 iterations','10 iterations',...
    '15 iterations','20 iterations')

Figure contains an axes object. The axes object contains 4 objects of type line. These objects represent 5 iterations, 10 iterations, 15 iterations, 20 iterations.

入力引数

すべて折りたたむ

数値入力。スカラー、ベクトル、行列または多次元配列として指定します。

データ型: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | fi
複素数のサポート: あり

CORDIC アルゴリズムを実行する反復回数。正の整数値スカラーとして指定します。niters を指定しない場合、アルゴリズムは既定値を使用します。

  • 固定小数点の入力では、niters の既定値は入力配列 theta の語長よりも 1 少なくなります。

  • 倍精度の入力では、niters の既定値は 52 です。単精度の入力では、既定値は 23 です。

データ型: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | fi

出力引数

すべて折りたたむ

逆正弦の角度値。ラジアン単位で返されます。

アルゴリズム

すべて折りたたむ

参照

[1] Volder, Jack E. “The CORDIC Trigonometric Computing Technique.” IRE Transactions on Electronic Computers. EC-8, no. 3 (Sept. 1959): 330–334.

[2] Andraka, Ray. “A Survey of CORDIC Algorithm for FPGA Based Computers.” In Proceedings of the 1998 ACM/SIGDA Sixth International Symposium on Field Programmable Gate Arrays, 191–200. https://dl.acm.org/doi/10.1145/275107.275139.

[3] Walther, J.S. “A Unified Algorithm for Elementary Functions.” In Proceedings of the May 18-20, 1971 Spring Joint Computer Conference, 379–386. https://dl.acm.org/doi/10.1145/1478786.1478840.

[4] Schelin, Charles W. “Calculator Function Approximation.” The American Mathematical Monthly, no. 5 (May 1983): 317–325. https://doi.org/10.2307/2975781.

拡張機能

すべて展開する

バージョン履歴

R2018b で導入