I am having problem with ComputeRoot fuction.. I am not getting how to start it's while loop..or If anybody knows it how to implement it just give me little hint..or guidance..
ask urself why have u decided to use the while loop....i mean how do u know there must be a while loop and not smthing else?
http://www.ipaste.org/Sxj just visit this code.. this is working fine for some input but not for others.. please reply me asap. because my other pset is remain to solve.
1:why do u set x_0=0.1? x_0 is to be set by function call. 2:while abs(evaluatePoly(poly,root)) >= epsilon: you want it to be higher than epsilon because if it is epsilon or lower then u have found your root. 3:in your code the derivative is always the same, but what you need is that on every iteration you get the derivative of your last derivative. 4: do not round in this exercise...u need all the numbers or it will fail the grader. hope those thoughts help you a bit .
Join our real-time social learning platform and learn together with your friends!