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.

28234支持两个浮点数“/”相除吗

看了芯片手册,28234貌似不支持浮点数运算

但我在程序里定义了 float div1=30000.123;  float div2=11.235;float div_result;

然后计算  div_result=div1/div2;  在CCS变量表中观察计算的结果是2670.238,结果是正确的

这是怎么回事?意思是支持浮点运算吗?可是芯片手册上说

– IEEE 754 单精度浮点单元 (FPU)(仅限 F2833x)鸭?

谢谢解答。

  • IEEE 754 单精度浮点单元 (FPU)(仅限 F2833x)

    是的,28234是没有FPU的。但一般会使用有IQMath伪浮点数计算库,所以可以进行浮点运算

    具体您可以查看说明 www.ti.com/.../tms320f28234.pdf

    For F2823x devices:
    – Either leave off the --float_support switch or use -v28 --float_support=none
    – Include the appropriate run-time support library for fixed point code. For example, use rts2800_ml.lib for C code or rts2800_ml_eh.lib for C++ code.
    – Consider using the C28x IQmath library - A Virtual Floating Point Engine to achieve a performance boost from math functions such as sin, cos, div, sqrt, and atan.