Advertisement
NikolayChukanov

ничего не понятно

Jan 12th, 2023
756
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. long double newton(long double x, long double e, long double (*f) (long double), long double (*df) (long double)){
  2.   long double dx = x - f(x) / df(x);
  3.   long double c = x - dx;
  4.   if (c < 0){
  5.     c = c * (-1);
  6.   }
  7.   if (c < e){
  8.     return dx;
  9.   }
  10.   return newton(dx, e, f, df);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement