Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

some notices about the last answer!

Posted by longpo at 2009-04-07 21:17:41 on Problem 3727 and last updated at 2009-04-07 21:18:17
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator