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.

TMS320F280021: TMU1下且开启relaxed模式,expf()被内联优化导致输入负值时结果出错

Part Number: TMS320F280021

编译器版本:TI v22.6.1.LTS

我启用了TMU1,并且设置--fp_mode=relaxed。这时expf被内联并最终调用IEXP2F32指令,但IEXP2F32会导致expf在负输入时结果有误,请问该如何处理呢?

例如我分别计算expf(1.0f)和expf(-1.0f),计算结果均为2.71827221。而expf(-1.0f)的结果应该为0.36787945。