#include <stdio.h>
#include <math.h>
double fun1(double x)
{
return 2*x*x*x-4*x*x+3*x-6;
}
double fun2(double x)
{
return 6*x*x-8*x+3;
}
int main()
{
double f1,f2,x,d;
int count = 0;
x = 100;
do {
f1 = fun1(x);
f2 = fun2(x);
d = f1/f2;
x -= d;
count ++;
} while(fabs(d) > 1e-5);
printf("总迭代次数:%d\n",count);
printf("最终的近似根为:");
printf("%lf\n",x);
return 0;
}