用牛顿迭代法求2*x*x*x-4*x*x+3*x-6=0在1.5附近的一个根
#include"iostream.h"
#include"math.h"
void main()
{double x0,f,f1;
double x=1.5;
do
{x0=x;
f=2*x0*x0*x0-4*x0*x0+3*x0-6;
f1=6*x0*x0-8*x0+3;
x=x0-f/f1;
}while((fabs(x-x0))>1e-5);
cout<<"The root of the equation is "<<x<<endl;
}
能不能帮我解释一下,看不懂。。。