/************************************************************** This program computes x such that f(x) = 0 , where f(x) is an N-th order polynominal equation with coefficients A[i] for (i = 0 to N) and g(x) = df(x)/dx ; Guess x[k] for k = 0 and then the program computes recursively x[k+1] = x[k] - f(x[k]) /g(x[k]) until you stop the program by typing-in "s" or you type "g" for the next guess for x[0] ; ************************************************************** Type "s" to stop program. Type "g" to start the next guess. **************************************************************/ N=2 A[0]=-2 A[1]=0 A[2]=1 x[0]=1.5 /**************************************************************/