DSP6678之_rcpsp学习记录

RSQRSP指令即float _rcpsp (float src)函数需要包含(c6x.h文件)资源详情如下图所示。

描述:根据src2值返回给dst值,dst值是近似src2值平方根倒数的一个值。RSQRSP指令提供一个计算因子,精度是2-8,迭代一次精度翻倍,迭代2次获得满精度23bits。

使用方法:如下图公式所示,根据RSQRSP指令提供的一个初始因子X[0]去迭代,v值是想要得到平方根的值。

例:迭代一次n = 0,x[1],迭代第二次为x[2],最后使用这个x[2]的因子进行平方根计算,平方根 = v * x[2]

注意点:

1) If src2 is SNaN, NaN_out is placed in dst and the INVAL and NAN2 bits are set.

2) If src2 is QNaN, NaN_out is placed in dst and the NAN2 bit is set.

3) If src2 is a negative, nonzero, nondenormalized number, NaN_out is placed in

dst and the INVAL bit is set.

4) If src2 is a signed denormalized number, signed infinity is placed in dst and the

DIV0, INEX, and DEN2 bits are set.

5) If src2 is signed 0, signed infinity is placed in dst and the DIV0 and INFO bits

are set. The Newton-Rhapson approximation cannot be used to calculate the

square root of 0 because infinity multiplied by 0 is invalid.

6) If src2 is positive infinity, positive 0 is placed in dst.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值