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.

三角函数问题



__atan,atan,__atanpuf32,这三个函数有什么区别?

__atan(1.0/0.0);
atan(1.0/0.0);
__atanpuf32(1.0/0.0);

以上计算结果都不一样。TMU的API函数手册有没有?

  • __atan与_atanpuf32均为TMU接受的指令,当TMU功能开启时会转化为TMU硬件加速指令进行计算,_atanpuf32为per unit value。
    同时为relaxed mode指令链接指令。

    相关说明在下面文档中的 第7章节Table 7-8中有描述

    TMS320C28x Optimizing C/C++ Compiler v18.1.0.LTS User's Guide (Rev. P)

    www.ti.com/.../spru514p.pdf


    atan是标准C语言库解析的,会用传统C语言编译器编译的软件算法进行计算。

    除了pu计算会完全有不同结果外,__atan与atan只是精度取舍的不同,应该差距不大,大多数应用都可以接受,只是计算速度会有不同。

    详细信息请查看附上的文档说明。