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.

[参考译文] TMS320F28069F:C28x IQmath 库:_IQ (float F)

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/805581/tms320f28069f-c28x-iqmath-library-_iq-float-f

器件型号:TMS320F28069F

您好!

我对 C28x IQmath 库有疑问。

具体而言、它位于 Float 至 iQ24数据类型转换实用程序:_IQ (float F)上。

它是在 IQmathLib.h 文件中定义的

#define  _IQ24 (a)     (long)((a)* 16777216.0L)

很明显、16777216.0等于2^24。

我无法理解为什么浮点数 A 乘 以2^24才能转换为 IQ24数据类型。

请向我清楚解释原因。

感谢您的指导。

此致、

G. Kim