degre3
C DEGRE3 SOURCE CB215821 18/09/21 21:15:33 9930 IMPLICIT INTEGER(I-N) IMPLICIT REAL*8(A-H,O-Z) -INC PPARAM -INC CCOPTIO C C POLYNOME DE DEGRE 3 SOUS LA FORME C X3 + AS2*X2 + AS1*X + AS0 = 0 C TR = SQRT(3.D0) AS2S3= AS2 /3.D0 Q = AS1/3.D0 - AS2S3**2 R =(AS1*AS2)/6.D0-AS0/2.D0 - AS2S3**3 D = Q**3 + R**2 C IF(IIMPI.EQ.9) THEN WRITE(6,*) 'Q ',Q WRITE(6,*) 'R ',R WRITE(6,*) 'D ',D ENDIF C IF(D) 1,2,2 2 SD=SQRT(D) S1=SIGN(1.D0,R+SD)*((ABS(R+SD))**(1.D0/3.D0)) S2=SIGN(1.D0,R-SD)*((ABS(R-SD))**(1.D0/3.D0)) XR1=S1+S2-AS2S3 XI1= 0.D0 XR2=-(S1+S2)/2.D0-AS2S3 XI2= TR*(S1-S2)/2.D0 XR3= XR2 XI3= -XI2 RETURN 1 SD=SQRT(-D) RO=(R**2-D)**(1.D0/6.D0) ARG=ATAN2(SD,R)/3.D0 if (abs(arg).lt.1e-7) arg=0.d0 SOM=RO*COS(ARG) DIF=RO*SIN(ARG) XR1=SOM*2.D0-AS2S3 XI1=0.D0 XR2=-SOM -AS2S3 - TR*DIF XI2=0.D0 XR3=-SOM -AS2S3 + TR*DIF XI3=0.D0 RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales