#include #include #include using namespace std; void newton(double x0, double er, int nmax, double xr, double ea, double fr) { //-- initial values int niter=0; double xold = x0; fr=FF(xold); // //___start of iterations __________ // cout<<" niter xr ea fr\n"; for(;;) { niter++; double fgr = FD1(xold); if(fgr!=0) { xr = xold - fr/fgr; } else { cout<<"error! zero derivative"<=nmax) { cout<<"warning! iterations limit"<