      SUBROUTINE EIG2(E1,E2,A,B,C,D)
      REAL A,B,C,D,Q,R,S,T,U,V,W
      COMPLEX E1,E2
      Q = ABS(B)
      R = ABS(C)
      T = SQRT(Q)*SQRT(R)
      U = .5*(A-D)
      S = ABS(U)
      IF ( S .LT. T ) GOTO 20
      IF ( T .NE. 0. ) GOTO  10
      E1 = A
      E2 = D
      RETURN
10    W = 1./T
      S = 1./S
      V = (S*U)**2+((B*W)*(C*W))*(S*T)**2
      GOTO 30
20    S = 1./T
      V = (S*U)**2+(B*S)*(C*S)
30    IF ( V .GT. 0. ) GOTO 40
      E1 = CMPLX(.5*(A+D),SQRT(-V)*T)
      E2 = CONJG(E1)
      RETURN
40    V = S*ABS(U) + SQRT(V)
      IF ( U .GT. 0. ) GOTO 60
      IF ( Q .GT. R ) GOTO 50
      E1 = A - B*(C*S)/V
      E2 = D + B*(C*S)/V
      RETURN
50    E1 = A - (B*S)*C/V
      E2 = D + (B*S)*C/V
      RETURN
60    IF ( Q .GT. R ) GOTO 70
      E1 = A + B*(C*S)/V
      E2 = D - B*(C*S)/V
      RETURN
70    E1 = A + (B*S)*C/V
      E2 = D - (B*S)*C/V
      RETURN
      END
