... OF HYDROGEN SULFIDE, AND STEEL THEREFOR » 使用方法用于生产压力容器在硫化氢、钢铁等 A square root method » 平方根的方法 Away from home » 远离家乡 ..
基于12个网页-相关网页
本文给出了在预定精确度下用迭代法计算算术平方根的方法,并分析了迭代的误差,给出了预定精确度下初始值的一个选取范围。
This paper gives a method to calculate the arithmetic square root by iteration with given accuracy, analyses the iteration error and provides a selected range of initial value with the given accuracy.
所以他们频繁地使用这种包含- 1的平方根的标记方法,仅仅是为了引入完全的对称。
So they frequently used this notation containing the root of minus 1, just to bring in the complete symmetry.
List方法对于这些类型操作很方便,但我的算法有个副作用,就是出现整数平方根时,会有重复。
List methods are convenient for these types of manipulations, but a side-effect of my algorithm is a duplicate entry when a whole-number square root pops up.
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.
好吧我能靠一些类似合约来保证,如果这么说你喜欢的话,其实就是当求平方根的方法,获得了两个我已经确认了是浮点数的数后,这个类似合约的东西就会保证,返回一个浮点数。
I'm using it as an abstraction, saying I'm going to have square root from somewhere, maybe I'll build it myself, maybe somebody gives it to me a s part of a library, so I'm burying the details inside of it.
我把这个方法作为一个抽象来引用,意味着我将会从另外一个,地方去求一个数的平方根,可能我会自己写这个方法,也可能我会从别人写的lib中去引用,因此我将实现的细节放到了其他地方。
I wanted to show you that, so, first thing I'm going to do is say, all right, I know I'm going to need square root in here, so I'm going to, in fact, import math.
我们可以开始完成这个方法了,我想让你们看到完成这个方法的过程,第一件事情就是,我们在这儿需要一个求平方根的方法,实际上我将引入math包。
应用推荐