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.

F28335的浮点除法结果始终为0,太诡异了

Other Parts Discussed in Thread: C2000WARE

ComPeriod = 5.0;
CPUTimer0Period = 1e-4;
TEMP1 = (ComPeriod/CPUTimer0Period-1);

测试代码如上所示,均为float形变量,计算出的TEMP1居然是-1,理论值应该是49999。我在”Expressions"窗口看到的结果如下图1所示。太诡异了!难道是我的FPU库设置不对?设置选项如图2所示。

图1

图2