如上图所示,TMU指令集除了sin cos atan等上图所示的指令集外,是否还有asin acos等反三角函数指令集,我想知道手册中哪里能找到这些指令集周期。谢谢各位大佬指示
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.
TMU不支持arcsin或arccos的指令集。您可以做的是利用两个逆向触发函数和TMU对arctan的支持来实现这些函数
// arcsin
phi = fabsf(theta);
asin_v = phi / sqrtf(1 - (phi*phi));
if (asin_v > 1.0f)
{
asin_b = 1.5708f - __atan(1.0f / asin_v);
}
else
{
asin_b = __atan(asin_v);
}
if (signbit(theta))
{
asin_b = -asin_b;
}
// arccos
acos_v = sqrtf(1 - (phi*phi)) / phi;
if (acos_v > 1.0f)
{
acos_b = 1.5708f - __atan(1.0f / acos_v);
}
else
{
acos_b = __atan(acos_v);
}
if (signbit(theta))
{
acos_b = 3.142159f - acos_b;
}