Advertisement
StoneHaos

Untitled

Apr 24th, 2021
884
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. double Newton(cut c, double eps) {
  2.     double x0, x1 = (c.first + c.second) / 2.0;
  3.     do {
  4.         x0 = x1;
  5.         x1 = x0 - f_(x0) / f__(x0);
  6.     } while (abs(x1 - x0) > eps);
  7.     return x1;
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement