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.

[参考译文] TMS320F28075:将 float 转换为 int 将具有不同的结果

Guru**** 2522770 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1018428/tms320f28075-convert-float-to-int-will-have-different-results

器件型号:TMS320F28075

您好!

下面是代码、我们已将相同的浮点值转换为2个 int32变量 i32AmsTemp、i32AmsTemp1、

但  i32AmsTemp=-94、 i32AmsTemp1=-93。

为什么?