It's a simple problem, but I just want to do it so you get used to working with vectors.
这是个简单的问题,但我还是想做一下好让你们习惯矢量运算
In there, I want to make this distinction, this nuance: the evaluator is still going to be taking those expressions and using its rules to get a value, but it's not going to print them back out.
在这里,我想要做这么一个,细微差别:运算器依然会,对表达式,进行求值,但是不会,显示结果值。
All I did was, I did a little bit of calculus, a little bit of algebra, and then I drew the thing.
我只不过是稍微用了点微积分,做了点代数运算,然后就画出来了
You might very well have done some very accurate math but it doesn't matter, because you did the math in the wrong place.
你可能很好地做完了一些很精确地数学运算,但是没有关系,因为你没有做错,数学运算。
Do what you normally do with ordinary numbers.
就按照通常处理数的运算的方法去做
We'll, later in the term when we get to more detailed numerical things, look at what's wrong.
这个学期的晚些时候我们,会做一些更具体的数值运算。
Just as in grade school when you're doing division and multiplication, you do it from left to right in terms of order of operations.
正像是在小学你做除法和乘法的时候,你毫不含糊地从左到右,按顺序做运算。
STUDENT: Standard order of operations, I guess take the multiplication first, and add the three.
学生:标准运算符的顺序,我猜是先做乘法,然后再去加3。
So each time through the loop, I'm doing three steps. Three basic operations.
因此每次运行这个循环,我做了三次基本运算。
And that's what they would do: they would do that specific computation.
那就是它们能做的事儿:,它们能做那个特定的运算。
Doing incrementation, pretty useless; right?
做增量运算,相当无用的,对不?
And now I have to do the mathematics.
现在我需要做一个数学运算。
Because in doing that, Python would then have a value that it could pass on into some other part of a computation, and if it wasn't what I wanted, I might be a long ways downstream in the computation before I actually hit some result that makes no sense.
因为如果这样做的话,Python会将,输入的值传递到下面的,一些运算中去,如果这个值的类型不是我想要的,我可能会在得到,一个毫无意义的结果之前,经历一个很长时间的,计算过程。
Now, the nanosecond is what, 10 to the minus 9 seconds.
一纳秒就是10的9次方分之一秒,而这个电脑一秒可以做2G次运算。
应用推荐