Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 11 Online
OpenStudy (anonymous):

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..

OpenStudy (microbot):

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?

OpenStudy (anonymous):

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.

OpenStudy (microbot):

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 .

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!