Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- include<math.h>
- using namespace.std;
- int nr(int n, float a[],float x0,float er, float *pRad
- float xn,xn 1;
- 7
- xn=x0
- doo
- n_1=xn;
- if (DerPol(n,xn 1)
- Der=f (xn_1+h) -f ( an_1) \h
- 10
- 11
- I
- }
- float DerPol ( int n,float a[],float x0)
- int i;
- float b[4],x;
- b[n]-a[n];
- x-b[n];
- for (i-grad-1;i>=0; i- -) b[i]
- int main)
- 16
- 19
- 20
- 21
- 22
- 23 {
- int n-4,nMax-36;
- float a[5]-[1,4,6,4, 1];
- float x0-1.9;
- 24
- 25
- 26
- 27
- }
- 28
- 29
- float rad;
- 30
- if (newtonraphson ( - 1 . 9, 0 .0001,0.01,36, &rad))
- 31
- 32
- cout<<rad<<endl;
- cout<<f(rad);
- }
- cout<<eroare"
- 33
- 34
- 35
- 36
- 37
- 12 3 4 56 7 O HII TH
- 234 670
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement