#include #include #define EPS 1.0e-6 double f(double x, double y){return x*2/3 + (x*x - y*y)/(3*((x*x+y*y)*(x*x+y*y)));} double g(double x, double y){return y*2/3 + 2*x*y/(3*((x*x+y*y)*(x*x+y*y)));} void newton_hukuso(double x, double y, double eps, double *result_x, double *result_y) { int i=0; double nx, ny; while(i<8) { i++; nx = f(x, y); ny = g(x, y); // 収束条件を満たせばループ終了 if(fabs(nx - x)