> In any case, that high school has like $10 million worth of computer equipment apparently in the front of it.
>,不管怎样,那个高中显然有,值1000万美元的计算机设备。
Literally, return the control from this function, and take the value of the next expression, and return that as the value of the whole computation.
正如字面意义上说的,从这个函数返回,然后取得下一个表达式的值,并把这个值作为整个计算的结果返回。
It's the world portfolio, it's everything and we compute the expected return on that portfolio, rm that's rm.
这就产生了世界投资组合,然后我们在此基础上计算出预期收益,所得值就是。
Here I actually need to tell the computer, "Give me some bytes in ram in which to store a value, and that value's going to be a floating point value."
这里我的确需要告诉计算机,“给我一些字节内存,来存储一个值,那个值将是,浮点型的数值“
They got some number that looks like for the wavelength they got the distance from here to Chicago, and they are going to drag that through the whole calculation.
他们得到一些数,看上去像是波长,他们得到这里,到芝加哥的距离,他们把那个值,用到整个计算中。
So we calculated those values too.
而我们也计算了它们的值。
So I differentiated this object, this is my first derivative and I set it equal to 0 Now in a second I'm going to work with that, but I want to make sure i'm going to find a maximum and not a minimum, so how do I make sure I'm finding a maximum and not a minimum?
这样我就对它求出导数了,这是一阶导数,令它等于0,一会我们就要计算了,但我先确定一下是最大值还是最小值,我怎么确定是最大值还是最小值呢
And it turns out that if we have a, for example, for s, a very large z effective or larger z effective than for 2 p, and we plug in a large value here in the numerator, that means we're going to end up with a very large negative number.
结果是如果我们有一个,举例来说对于s一个很大的有效电荷量或者,比2p大的有效电荷量,并且我们将一个较大的值代入计算器,那意味着我们最后会得到,一个非常大的负数。
So, we know in this example the initial height should be 15 meters and the initial velocity should be 10, and for acceleration, I'm going to use -g and to keep life simple, I'm going to call it -10.
我们知道在这个例子中,初始高度为15米,初始速度为10,然后是加速度,我们用"-g"表示重力加速度,为了计算方便,加速度的值取为-10
Which are actually things that take in a value and ask the computer to do something with it.
这其实也就是让计算机,对某个值进行某种操作。
It's going to do a lot of type checking for you before it actually passes things back.
它会在将输入值进行计算之前,做很多类型检查。
Computing values whose answer I should already know.
也就是计算那些,我已经知道答案都值。
As you know, income inequality is getting worse, low-income wages are not going up, so that component of housing has been declining in real terms.
众所周之,收入的不平等愈演愈烈,低收入者的工资不会上涨,因此以实际值计算的这部分成本是下降的
So the fact that I'm erasing it does not mean that the computer erased that memory or over wrote those values with all zeros.
事实上,我清除它的意思,不是说计算机把内存清除,或者用0覆盖这些值。
And we can go through and calculate the value of this quantity in parenthesis. And, when we do so, we get the value 2.18 times 10 to the minus 18 joules.
我们能进行计算这些值,如果我们这样做,我们能算出是,2。18,乘以10,的负18焦耳。
But notice the previous line, where I am computing volatility.
但是请注意前面这个语句,我用这个语句计算了浮动值。
To actually apply this it helps to go to something called the normal approximation to the binomial, because it's kind of difficult to compute this formula.
在实际应用这些公式的时候,需要运用二项分布的正态近似定理,因为二项分布公式的值很难计算
And I want to stress this, we're going to come back to it later on in the term, so the way I'd like you to think about it for now, is that somewhere in the machine, there's a big space that contains all possible values.
我想要强调一点,我们在晚些时候,还会回头来讲这一点,因此现在,我需要你们形成这么一个观点,就是在计算机的某处,有一个包含了所有可能值的,很大的空间,好。
Well, what we can see here is that I'm computing the same value over and over again.
好吧,我们现在看到的是,我不断地在计算同一个值。
And then I'm going to just return the bigger of the two. Little bit complicated, but it's basically just implementing this decision tree.
我会计算总价值,然后我会返回两者中的较大值,有点小复杂,但是它就是按照这个决策树在运行。
Second thing we saw is, that using this as a computation, I can return multiple values.
我们看到的第二件事是把它用作计算,我可以返回多个值。
So when I'm done, I'm going to give the value back out. All right?
当它完成计算后,需要返回个值对不对?
If it was already there, I just look it up.
如果是已经计算过的值,我将查询后再调用它。
I've computed a 13 value which is 13.
我已经计算了,一个值答案是。
So I'm first going to compute something base move Think of this as kind of the basis from which we'll be computing the actual move.
所以我先计算叫,的东西,called,the,base,move。,它是我们计算实际值时,用到的初值。
If it's not in the memo, I'll compute its value and put it in the memo.
如果值没有保留在memo中,我要计算它的值,并把这个值存在memo中。
OK, so what else do I have then in my little class definitions here?
你需要重新计算其他的值,来让保证不出现错误?
The green line is the building costs and you can see that building costs, since 1890, in real terms-- everything is corrected for inflation -have gone up a little bit since 1890, but not a whole lot.
绿线表示了建筑成本,你可以看到建筑成本,自1890年来,以实际值计算,所有的数据均进行了通胀修正,从1890年开始有一点点上涨,并非是大幅度上涨
.. The portfolio expected return-- x3 we have to choose three things now: x1, x2, and x3.
要计算投资组合的预期收益-,我们必须确定三个值x1,x2和。
So, operands. Let us take expressions, get values out, we can store them away in places, but ultimately we want to do something with them, so we need to now start talking about what are the things we can do inside of Python, or any programming language, to manipulate them.
也就是运算对象,让我们看看这些表达式,然后看看里面的这些值,我们可以把他们存在计算机的任何位置中,最终目的还是要对这些值做一些操作,因此我们现在需要开始讨论,在Python里面可以做什么,来操作它们了,或者在任何编程语言里。
应用推荐