The basic idea is, you take a guess and you -- whoops -- and you find the tangent of that guess.
首先取个猜想数,然后,嗯,去取猜想数那儿的切线。
So this is very similar, this is a kind of recursive thinking we talked about earlier, where we take our problem and we make it smaller we solve a smaller problem, et cetera.
我们则跳过比猜想数小的那个区间,然后我们重复这一过程,跟之前我们讲过的,递归思想非常类似,我们解决问题的时候,先把问题一步步变小,然后解决小问题。
In fact, my program crashes because I end up trying to divide by zero, a really bad thing. Hint: if you implement Newton's method, do not make your first guess zero.
我下一步都没法开始,实际上,我的程序会崩溃,因为我试着去除0了,真糟糕,提示你:如果你想用牛顿的方法,第一个猜想数别设为0。
That being the case, what's my next guess?
那下一步我该怎么取猜想数呢?
And that idea was, we make a guess in the middle, we test it so this is kind of a guess and check, and if the answer was too big, then we knew that we should be looking over here. If it was too small, we knew we should be looking over here, and then we would repeat.
这些有理数是有序排列的,然后我们的想法是,首先在中间取个数作为猜想数,然后对这个猜想数进行验证,如果由猜想数得到的答案太大,我们知道应该跳过,比猜想数大的那个区间,如果太小的话。
Yeah. Suppose I choose it right down there I guess 0. Well, the tangent there will not even have an x intercept. So I'm really going to be dead in the water.
好,如果我选猜想数为0,好吧,这个点的切线甚至和x轴都没交点,所以在这儿这一原则,真的不起作用了。
应用推荐