cordiccexp
CORDIC-based近似的复指数
语法
y = cordiccexp(θ,硝石)
输入参数
|
|
|
|
输出参数
|
|
例子
下面的例子说明了迭代次数的影响的结果cordiccexp
近似。
wrdLn = 8;θ= fi(π/ 2,1 wrdLn);流(' \ n \ nNITERS \ t \ tY(罪)\ t错误\ t lsb \ \ tX (COS) \ t错误\ t lsb \ n”);流(' - - - - - - \ \ t t - - - - - - - - - - - - - \ \ t - - - - - \ \ t t - - - - - - - - - - - - - \ \ t - - - - - \ n”);硝石= 1:(wrdLn - 1) cis = cordiccexp(θ,硝石);fl = cis.FractionLength;x =实际(cis);y =图像放大(cis);x_dbl =双(x);x_err = abs (x_dbl - cos(双(θ))); y_dbl = double(y); y_err = abs(y_dbl - sin(double(theta))); fprintf('%d\t\t%1.4f\t %1.4f\t %1.1f\t\t%1.4f\t %1.4f\t %1.1f\n', niters, y_dbl, y_err,(y_err * pow2(fl)), x_dbl, x_err,(x_err * pow2(fl))); end fprintf('\n');
输出表出现如下:
硝石Y(罪)错误lsb X (COS)错误lsb - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 0.7031 0.2968 19.0 0.7031 0.7105 45.5 2 3 0.9375 0.0625 4.0 0.3125 0.3198 20.5 0.9844 0.0156 1.0 0.9844 0.0156 1.0 -0.0156 0.0083 0.0938 - 0.1011 6.5 - 4 5 6 1.0000 0.0000 0.0 0.0312 0.0386 2.5 1.0000 0.5 0.0000 0.0 0.0000 1.0000 0.0000 0.0 0.0156 0.0230 - 1.5 0.0073 - 0.5 7
更多关于
算法
引用
[1]Volder,我。“CORDIC三角计算技术。“愤怒交易在电子计算机上。EC-8卷,1959年9月,第330 - 334页。
[2]Andraka, r“的调查CORDIC算法基于FPGA的电脑。“学报1998 ACM / SIGDA第六国际研讨会现场可编程门阵列。2月22 - 24日,1998年,页191 - 200。
[3]沃尔特,j.s“初等函数的统一算法。“惠普公司,帕洛阿尔托。春天联合计算机会议上,1971年,页379 - 386。(从计算机历史博物馆的收藏)。www.computer.org/csdl/proceedings/afips/1971/5077/00/50770379.pdf
[4]Schelin Charles w .“计算器功能近似。“美国数学月刊。5号卷。90年,1983年5月,页317 - 325。