You know, if you're wandering through Harvard Square and you see an out-of-work Harvard grad, they're handing out examples of square roots, they'll give you an example and you can test it to see is the square root of 2, 1.41529 or whatever.
你知道,如果你从哈佛校园里穿过去,你看见了一个失业校友,正在派发平方根的示例,他们会给你一个例子,而你会检查2的平方根是1。41529或者别的什么。
In a high-level language, square root might simply be a primitive that you can use rather than you having to go over and code it.
一个高级的语言,平方根可能仅仅,只是你能使用的一个基本要素,而不是你需要去编译它。
But if you can accept the purity of the statement I just made, it is at the root of the thing you have a solution.
但如果你能够遵从原教旨主义的方式,那么这就是你解决此问题的根本
Because the square root of 10,000 is 100, whatever the standard deviation of the portfolio is, you would divide it by 100 and it would become really small.
因为一万的平方根是一百,无论这个投资组合的标准差是多大,当除以100后就都变得很小很小了。
Well I'm relying on the contract, if you like, that the manufacturer of square root put together, which is, if I know I'm giving it two floats, which I do because I make sure they're floats, the contract, if you like, of square root says I'll give you back a float.
好吧我能靠一些类似合约来保证,如果这么说你喜欢的话,其实就是当求平方根的方法,获得了两个我已经确认了是浮点数的数后,这个类似合约的东西就会保证,返回一个浮点数。
Look, part of the reason I'm flaming at you is, something like square root, it seems dumb to write specs on it. Everybody knows what this is going to do. But you want to get into that discipline of good hygiene, good style.
也是非常重要的,我在这里说的,一些理由就是像平方根,为它写规范听上去很傻,每个人都知道它是干什么的。
If I say x is 2, I want to know, what's the square root of 2, well if you're enough of a geek, you'll say 1.41529 or whatever the heck it is, but in general, this doesn't help you find the square root.
如果我说X等于,我想知道,2的平方根是多少,那么如果你足够书呆子你就会说,1。41529或者随便什么玩意儿,但是大体上,它不会帮你算出平方根。
If you had one negative number in it, then the product would be a negative number and, if you took a root of that, then you might get an imaginary number.
如果这当中有一个负数,乘积就会变成负的,如果你对一个负数开根号,你就会得到一个虚数
应用推荐