我正在编写一个程序来检查混合混凝土所需材料的温度。然后它将执行一个公式来确定达到所需混凝土温度所需的水温。我有公式的所有正确信息,所以这不是问题,但是当我编译程序时,我收到多个累加器扩展警告,每个都在数学语句之后。我尝试拆分数学,认为运行数字变得太大,但事实并非如此,因为它仍然有这个警告。当我运行程序时,如果我期望得到 80 度范围内的结果,我会得到疯狂的大正面或负面结果。第一个等式适用于寒冷天气条件,第二个等式适用于炎热条件。在我添加热方程之前,冷方程运行良好。
所以我的问题是:什么是累加器扩展,为什么我在数学之后会收到一个警告?
这是我的代码:
temporary2 := firstBinWeight + secondBinWeight + thirdBinWeight + fourthBinWeight + cementiousMaterialsWeight + (4.54545 * waterWeight);
temporary1 := firstBinTemp * firstBinWeight +secondBinTemp * secondBinWeight + thirdBinTemp * thirdBinWeight + fourthBinTemp * fourthBinWeight +cementiousMaterialsTempTest * cementiousMaterialsWeight - temporary2 * requiredConcreteTemp / waterWeight;
outputTemp := -0.22 * temporary1;
temporary5 := requiredConcreteTemp + 112;
temporary4 := firstBinWeight * requiredConcreteTemp + secondBinWeight * requiredConcreteTemp + thirdBinWeight * requiredConcreteTemp + fourthBinWeight * requiredConcreteTemp - cementiousMaterialsWeight * requiredConcreteTemp - 4.54545 * waterWeight * requiredConcreteTemp + iceWeight * temporary5;
temporary3 := firstBinTemp * firstBinWeight + secondBinTemp * secondBinWeight + thirdBinTemp * thirdBinWeight + fourthBinTemp * fourthBinWeight + cementiousMaterialsTempTest * cementiousMaterialsWeight - temporary4 / waterWeight;
outputTemp2 := -0.22 * temporary3;