• anonymous
I need help on the Newton question (#3) on the problem set 2! I use the eval_poly and compute_deriv function from the first few questions. Those check out, but I just can't get the while loop to work. It runs forever, for reasons I don't understand. Here's the code: deriv = compute_deriv(poly) numguess = 0 while abs(eval_poly(poly, x_0)) >= epsilon: numguess += 1 x_0 = x_0 - (eval_poly(poly, x_0))/(eval_poly(deriv, x_0)) else: print (eval_poly(poly, x_0), numguess) return
MIT 6.00 Intro Computer Science (OCW)
• Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Looking for something else?

Not the answer you are looking for? Search for more explanations.