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.

M430F2252T计算出错

我在主程序中,循环执行下面的一组计算程序,经常会出错,这可能是什么原因导致的了。

wRTempValue = (int)((long)(dwROutputVoltCalValue * 10 >> 12) * 4963 >> 9);
wROutputVoltNew = (int)((long)(wRTempValue) * 9099 >> 13); 
wSTempValue = (int)((long)(dwSOutputVoltCalValue * 10 >> 12) * 4963 >> 9);
wSOutputVoltNew = (int)((long)(wSTempValue) * 9099 >> 13);
wTTempValue = (int)((long)(dwTOutputVoltCalValue * 10 >> 12) * 4963 >> 9);
wTOutputVoltNew = (int)((long)(wTTempValue) * 9099 >> 13);