bairst
C BAIRST SOURCE CHAT 05/01/12 21:31:31 5004 IMPLICIT INTEGER(I-N) IMPLICIT REAL*8(A-H,O-Z) C C recherche des racines reel d'un polynome de degre N par la methode C de lin-bairstow ( procedure fournie par Mr Valbuena CERN) C -INC SMLREEL pointeur mlree4.mlreel,mlree5.mlreel segini,mlreel=mlree1 kerre=0 segini mlree1 segini mlree2 segini mlree3 segini mlree4 if(ireel.eq.0) segini mlree5 k = 0 n=jg - 1 do 10 ilj=1,10000 * write(6,*) ' boucle 10 ilj', ilj rmin=abs (r) do 20 ijl=1,100000 * write(6,*) ' boucle 20 ijl n ', ijl,n do 30 j=2,n-2 30 continue r2=(s1*u-r1*w)/(t*w-u*v) s2=(v*r1-t*s1)/(t*w-u*v) s=s+s2 r=r+r2 * write(6,*) ' boucle 20 ijl n r r2', ijl,n, r,r2 * write(6,*) ' r2 ' , r2 if( abs(r2).GT.0.0000001) then * write(6,*) ' boucle 20 ijl n r r2', ijl,n, r,r2 if(abs(r2).lt.rmin) then nite=ijl rmin=abs(r2) rvrai=r-r2 svrai=s-s2 endif go to 20 else * write(6,*) ' boucle 20 ijl n r r2', ijl,n, r,r2 go to 21 endif 20 continue kerre=944 * write(6,*) ' non convergence rmin degré n ite' ,rmin,n,nite r=rvrai s=svrai 21 continue do 40 klm=1,100000 * write(6,*) ' klm n k' , klm,n,k * write(6,*) ' klm n ' , klm,n g=r*r-4*s if(g.gt.0.) then k = k + 1 preel=-r/2.d0 pima=sqrt(g) /2.d0 k = k + 1 * write(6,*) ' sol reel ' , mlree4.prog(k-1),mlree4.prog(k) else if(ireel.eq.0) then k = k+1 preel = -r/2.d0 pima = sqrt (-1.*g) / 2. k = k +1 * write(6,*) ' sol ima ' , mlree4.prog(k-1),mlree5.prog(k-1) endif endif n = n -2 if(n.eq.0) then go to 11 endif do 50 i=n,0,-1 * write(6,*) ' boucle 50 i',i 50 continue if(n.GT.2) go to 10 if(n.eq.2) then go to 40 endif go to 41 40 continue 41 continue if(n.lt.2) then k = k +1 endif endif go to 11 10 continue 11 continue jg = k segadj mlree4 if(ireel.eq.0) segadj mlree5 segsup mlree1,mlree2,mlree3,mlreel segdes mlree4 iretr=mlree4 if(ireel.eq.0) then segadj mlree5 segdes mlree5 ireti=mlree5 endif return end
© Cast3M 2003 - Tous droits réservés.
Mentions légales