This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

c6678 单精度数据平方根指令问题

Other Parts Discussed in Thread: MATHLIB

您好:

我想对个float型数组中每个元素开平方运算, 我发现C66X指令中没有直接对float型数据做开方根的运算,但是有开方根并取倒数的指令RSQRSP,同时也有一个对float型数据直接取倒数的指令RCPSP,  那么我直接组合这两条指令,应该就可以得到对一个float型数据求平方根了. 但是我现在担心的是,这两条指令得到的结果都是一个近似值, 这样经过2次近视运算后,得到的结果可能存在精度的问题. 想请问下,到底这样能否实现一个float的开方根并保证它的精度.

另外一个问题,就是math库里面有一个sqrtsp()函数用于实现对一个float型数据开方根,它的汇编中好像并不是我这样实现的,请问和我的方法有什么区别吗?