#include<stdio.h>
#include<math.h>
#define EPS 1e-6
int main(void)
{
double x,d = 0;
printf("Please input initial root:\n");
scanf("%lf",&x);
do
{
d = -(x*(x*x*x*(3*x-4)-5)+13 )/ (12*x*x*(x-1)-5);
x += d;
}while(fabs(d) > EPS);
printf("x = %lf\n",x);
return 0;
}
萧子都
相关分类