StoneHaos

Untitled

Apr 24th, 2021
553
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data