Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
some notices about the last answer!In Reply To:过的同志帮忙测测下面的答案对不对? Posted by:MasterLuo at 2009-04-07 14:25:44 quote: " 6x +32x -5x^3 -7x^3 +31 -4 = 0 3 我也得5. x0 = 3.0000000000000 f(x0) = -183.000000000 x1 = 2.3601398601000 f(x1) = -41.0738017179 x2 = 2.1074236723000 f(x2) = -5.2326539641 x3 = 2.0644924021000 f(x3) = -0.1388809579 x4 = 2.0632893096000 f(x4) = -0.0001075547 x5 = 2.0632883765000 我把中间过程都打下来了,都差手算验证了。。 请教您如何处理这点,感谢。。" quote: "The iteration will stop when |xn+1 - xn| < tolerance or |f(xn)| < tolerance then n is the answer." every iteration, you can get x(n) and x(n+1) so in the 5th iteration, you can get x4 and x5, then fabs(x4-x5)<tol, break, and 4 is answer! :) Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator