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.
您好,
最近我在使用CCS7调试28335的时候,给一个全局变量赋值,比如在watch window里给float型变量test1赋值0.001,但是显示的时候为0.00100000005,如下图所示:
程序如下所示:
/**
* main.c
*/
float test1 = 0.001, test2 = 20, test3 = 0;
int main(void)
{
for(;;)
{
test3 = test1/test2;
}
return 0;
}
这是显示的问题还是存储的问题呢?
谢谢!
CCS7.2.0和7.4.0都是这样的问题,CCS5.3没有这个问题;仿真器是XDS100V2。
重贴:http://www.deyisupport.com/question_answer/microcontrollers/c2000/f/56/t/146370.aspx