zlaev2.f.html

来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 118 行

HTML
118
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>zlaev2.f</title>
 <meta name="generator" content="emacs 21.3.1; htmlfontify 0.20">
<style type="text/css"><!-- 
body { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default   { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default a { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
span.comment   { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.comment a { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
 --></style>

 </head>
  <body>

<pre>
      SUBROUTINE <a name="ZLAEV2.1"></a><a href="zlaev2.f.html#ZLAEV2.1">ZLAEV2</a>( A, B, C, RT1, RT2, CS1, SN1 )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  -- LAPACK auxiliary routine (version 3.1) --
</span><span class="comment">*</span><span class="comment">     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
</span><span class="comment">*</span><span class="comment">     November 2006
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Scalar Arguments ..
</span>      DOUBLE PRECISION   CS1, RT1, RT2
      COMPLEX*16         A, B, C, SN1
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Purpose
</span><span class="comment">*</span><span class="comment">  =======
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  <a name="ZLAEV2.15"></a><a href="zlaev2.f.html#ZLAEV2.1">ZLAEV2</a> computes the eigendecomposition of a 2-by-2 Hermitian matrix
</span><span class="comment">*</span><span class="comment">     [  A         B  ]
</span><span class="comment">*</span><span class="comment">     [  CONJG(B)  C  ].
</span><span class="comment">*</span><span class="comment">  On return, RT1 is the eigenvalue of larger absolute value, RT2 is the
</span><span class="comment">*</span><span class="comment">  eigenvalue of smaller absolute value, and (CS1,SN1) is the unit right
</span><span class="comment">*</span><span class="comment">  eigenvector for RT1, giving the decomposition
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  [ CS1  CONJG(SN1) ] [    A     B ] [ CS1 -CONJG(SN1) ] = [ RT1  0  ]
</span><span class="comment">*</span><span class="comment">  [-SN1     CS1     ] [ CONJG(B) C ] [ SN1     CS1     ]   [  0  RT2 ].
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Arguments
</span><span class="comment">*</span><span class="comment">  =========
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  A      (input) COMPLEX*16
</span><span class="comment">*</span><span class="comment">         The (1,1) element of the 2-by-2 matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  B      (input) COMPLEX*16
</span><span class="comment">*</span><span class="comment">         The (1,2) element and the conjugate of the (2,1) element of
</span><span class="comment">*</span><span class="comment">         the 2-by-2 matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  C      (input) COMPLEX*16
</span><span class="comment">*</span><span class="comment">         The (2,2) element of the 2-by-2 matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  RT1    (output) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment">         The eigenvalue of larger absolute value.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  RT2    (output) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment">         The eigenvalue of smaller absolute value.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  CS1    (output) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment">  SN1    (output) COMPLEX*16
</span><span class="comment">*</span><span class="comment">         The vector (CS1, SN1) is a unit right eigenvector for RT1.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Further Details
</span><span class="comment">*</span><span class="comment">  ===============
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  RT1 is accurate to a few ulps barring over/underflow.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  RT2 may be inaccurate if there is massive cancellation in the
</span><span class="comment">*</span><span class="comment">  determinant A*C-B*B; higher precision or correctly rounded or
</span><span class="comment">*</span><span class="comment">  correctly truncated arithmetic would be needed to compute RT2
</span><span class="comment">*</span><span class="comment">  accurately in all cases.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  CS1 and SN1 are accurate to a few ulps barring over/underflow.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Overflow is possible only if RT1 is within a factor of 5 of overflow.
</span><span class="comment">*</span><span class="comment">  Underflow is harmless if the input data is 0 or exceeds
</span><span class="comment">*</span><span class="comment">     underflow_threshold / macheps.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> =====================================================================
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Parameters ..
</span>      DOUBLE PRECISION   ZERO
      PARAMETER          ( ZERO = 0.0D0 )
      DOUBLE PRECISION   ONE
      PARAMETER          ( ONE = 1.0D0 )
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Local Scalars ..
</span>      DOUBLE PRECISION   T
      COMPLEX*16         W
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Subroutines ..
</span>      EXTERNAL           <a name="DLAEV2.77"></a><a href="dlaev2.f.html#DLAEV2.1">DLAEV2</a>
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Intrinsic Functions ..
</span>      INTRINSIC          ABS, DBLE, DCONJG
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Executable Statements ..
</span><span class="comment">*</span><span class="comment">
</span>      IF( ABS( B ).EQ.ZERO ) THEN
         W = ONE
      ELSE
         W = DCONJG( B ) / ABS( B )
      END IF
      CALL <a name="DLAEV2.89"></a><a href="dlaev2.f.html#DLAEV2.1">DLAEV2</a>( DBLE( A ), ABS( B ), DBLE( C ), RT1, RT2, CS1, T )
      SN1 = W*T
      RETURN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     End of <a name="ZLAEV2.93"></a><a href="zlaev2.f.html#ZLAEV2.1">ZLAEV2</a>
</span><span class="comment">*</span><span class="comment">
</span>      END

</pre>

 </body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?