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.
工具/软件:Code Composer Studio
我想将两个数字相乘、在某些情况下它不起作用。
在这种情况下,它运行良好:
_iq a=_IQ (10.0);
float32 b=2.5;
x =_IQtoF (_IQmpy (_IQ (b)、a));//得到浮点25
但在这种情况下、它不能正常工作
float32 q=0.0;_iq
Y1=_IQ (1.5);
q =_IQtoF (_IQmpy (_IQ (100)、Y1));// 结果 shoud 为150、但在 viewwatch 中为-1026293761
我尝试改变 IQ、例如_IQ20 (100)、_IQ21 (100)..... 但我得不到正确的结果。
需要在代码中更改的内容
感谢您的回答
您好!
[引用 user="Valentin Vanyo"] float32 q=0.0;_iq[/quot]
_IQ 在这里做什么?
[引用用户="Valentin Vanyo"]Y1=_IQ (1.5);
Y1是如何初始化的? 它应该是_IQ Y1;以某种方式_IQ 已移至上方行。
[引用 user="Valentin Vanyo"]q =_IQtoF (_IQmpy (_IQ (100)、Y1));// 结果 shoud 为150,但在 viewwatch 中为-1026293761
使用_IQ (100.0)尝试
此致、
Gautam