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.

[参考译文] TMS320F28388S:当--float_support=fpu32 时、F28388 上的 (0.01F) 和 (float) 0.01 之间有何不同?

Guru**** 2411080 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1542966/tms320f28388s-what-different-between-0-01f-and-float-0-01-on-f28388-when---float_support-fpu32

器件型号:TMS320F28388S


工具/软件:

尊敬的团队:

当--float_support=fpu32 时、F28388 上的 (0.01F) 和 (float) 0.01 之间有何不同?

客户表示在代码中使用 (0.01F) 时、编译器会将其视为双倍、计算速度会减慢。

此致、

Zane

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Zane、

    使用 0.01F 会使浮点常量被解释为单精度常量、因此计算不会用 FPU32 减慢。

    谢谢、

    Sira