Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while(abs(x1-x2)>epsilon){
- std::cout.setf(std::ios::fixed, std::ios::floatfield );
- std::cout.precision(20);
- y1=x1*(x1*x1-1)*sin(x1)*sin(x1);
- y2=x2*(x2*x2-1)*sin(x2)*sin(x2);
- x0=x1-(y1*(x1-x2)/(y1-y2));
- x2=x1;
- x1=x0;
- y0=(x0*x0*x0-x0)*sin(x0)*sin(x0);
- y2=y1;
- y1=y0;
- j++;
- }
Advertisement
Add Comment
Please, Sign In to add comment