Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #include<iostream>
  2. include<math.h>
  3. using namespace.std;
  4. int nr(int n, float a[],float x0,float er, float *pRad
  5. float xn,xn 1;
  6. 7
  7. xn=x0
  8. doo
  9. n_1=xn;
  10. if (DerPol(n,xn 1)
  11. Der=f (xn_1+h) -f ( an_1) \h
  12. 10
  13. 11
  14. I
  15. }
  16. float DerPol ( int n,float a[],float x0)
  17. int i;
  18. float b[4],x;
  19. b[n]-a[n];
  20. x-b[n];
  21. for (i-grad-1;i>=0; i- -) b[i]
  22. int main)
  23. 16
  24. 19
  25. 20
  26. 21
  27. 22
  28. 23 {
  29. int n-4,nMax-36;
  30. float a[5]-[1,4,6,4, 1];
  31. float x0-1.9;
  32. 24
  33. 25
  34. 26
  35. 27
  36. }
  37. 28
  38. 29
  39. float rad;
  40. 30
  41. if (newtonraphson ( - 1 . 9, 0 .0001,0.01,36, &rad))
  42. 31
  43. 32
  44. cout<<rad<<endl;
  45. cout<<f(rad);
  46. }
  47. cout<<eroare"
  48. 33
  49. 34
  50. 35
  51. 36
  52. 37
  53. 12 3 4 56 7 O HII TH
  54. 234 670
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement