从操作数堆栈获取所需的操作数。
如果任意一个操作数是浮点型的,则所有操作数都将按浮点型进行计算,并且结果也是浮点型的。
If any of the operands is a float, then all operands are evaluated as floats, and the results are floats.
当您根据操作数求值时,它将在操作数中的适当位置进行变更。
When you evaluate this against the operand, it will make the change in place in the operand.
Let's say you have to go through three or four operations to get a final number, well, do it algebraically.
让我们说,你不得不通过3-4个操作,才能得到最终的数,好吧,用代数方法求解。
Just take a look: if this is 9, 5 divided by 9 is always going to be 0 point something, and if you thus have two integers and you're rounding down, which is what happens when you do integral math we're using this operator, I'm going to get zero times whatever.
稍微看一看:如果这是9,5除以9会得到,0点几,如果你用两个整型数,你舍去小数,这就是当你们,用整型数使用这个操作的所发生的事情,我将得到数值0乘以任何一个数字。
Count the number of primitive operations in each step.
数一数每一步中的基本操作,好的,如果我们看看这段代码。
应用推荐