LAPACK  3.4.1
LAPACK: Linear Algebra PACKage
zlaev2.f
Go to the documentation of this file.
00001 *> \brief \b ZLAEV2
00002 *
00003 *  =========== DOCUMENTATION ===========
00004 *
00005 * Online html documentation available at 
00006 *            http://www.netlib.org/lapack/explore-html/ 
00007 *
00008 *> \htmlonly
00009 *> Download ZLAEV2 + dependencies 
00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaev2.f"> 
00011 *> [TGZ]</a> 
00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaev2.f"> 
00013 *> [ZIP]</a> 
00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaev2.f"> 
00015 *> [TXT]</a>
00016 *> \endhtmlonly 
00017 *
00018 *  Definition:
00019 *  ===========
00020 *
00021 *       SUBROUTINE ZLAEV2( A, B, C, RT1, RT2, CS1, SN1 )
00022 * 
00023 *       .. Scalar Arguments ..
00024 *       DOUBLE PRECISION   CS1, RT1, RT2
00025 *       COMPLEX*16         A, B, C, SN1
00026 *       ..
00027 *  
00028 *
00029 *> \par Purpose:
00030 *  =============
00031 *>
00032 *> \verbatim
00033 *>
00034 *> ZLAEV2 computes the eigendecomposition of a 2-by-2 Hermitian matrix
00035 *>    [  A         B  ]
00036 *>    [  CONJG(B)  C  ].
00037 *> On return, RT1 is the eigenvalue of larger absolute value, RT2 is the
00038 *> eigenvalue of smaller absolute value, and (CS1,SN1) is the unit right
00039 *> eigenvector for RT1, giving the decomposition
00040 *>
00041 *> [ CS1  CONJG(SN1) ] [    A     B ] [ CS1 -CONJG(SN1) ] = [ RT1  0  ]
00042 *> [-SN1     CS1     ] [ CONJG(B) C ] [ SN1     CS1     ]   [  0  RT2 ].
00043 *> \endverbatim
00044 *
00045 *  Arguments:
00046 *  ==========
00047 *
00048 *> \param[in] A
00049 *> \verbatim
00050 *>          A is COMPLEX*16
00051 *>         The (1,1) element of the 2-by-2 matrix.
00052 *> \endverbatim
00053 *>
00054 *> \param[in] B
00055 *> \verbatim
00056 *>          B is COMPLEX*16
00057 *>         The (1,2) element and the conjugate of the (2,1) element of
00058 *>         the 2-by-2 matrix.
00059 *> \endverbatim
00060 *>
00061 *> \param[in] C
00062 *> \verbatim
00063 *>          C is COMPLEX*16
00064 *>         The (2,2) element of the 2-by-2 matrix.
00065 *> \endverbatim
00066 *>
00067 *> \param[out] RT1
00068 *> \verbatim
00069 *>          RT1 is DOUBLE PRECISION
00070 *>         The eigenvalue of larger absolute value.
00071 *> \endverbatim
00072 *>
00073 *> \param[out] RT2
00074 *> \verbatim
00075 *>          RT2 is DOUBLE PRECISION
00076 *>         The eigenvalue of smaller absolute value.
00077 *> \endverbatim
00078 *>
00079 *> \param[out] CS1
00080 *> \verbatim
00081 *>          CS1 is DOUBLE PRECISION
00082 *> \endverbatim
00083 *>
00084 *> \param[out] SN1
00085 *> \verbatim
00086 *>          SN1 is COMPLEX*16
00087 *>         The vector (CS1, SN1) is a unit right eigenvector for RT1.
00088 *> \endverbatim
00089 *
00090 *  Authors:
00091 *  ========
00092 *
00093 *> \author Univ. of Tennessee 
00094 *> \author Univ. of California Berkeley 
00095 *> \author Univ. of Colorado Denver 
00096 *> \author NAG Ltd. 
00097 *
00098 *> \date November 2011
00099 *
00100 *> \ingroup complex16OTHERauxiliary
00101 *
00102 *> \par Further Details:
00103 *  =====================
00104 *>
00105 *> \verbatim
00106 *>
00107 *>  RT1 is accurate to a few ulps barring over/underflow.
00108 *>
00109 *>  RT2 may be inaccurate if there is massive cancellation in the
00110 *>  determinant A*C-B*B; higher precision or correctly rounded or
00111 *>  correctly truncated arithmetic would be needed to compute RT2
00112 *>  accurately in all cases.
00113 *>
00114 *>  CS1 and SN1 are accurate to a few ulps barring over/underflow.
00115 *>
00116 *>  Overflow is possible only if RT1 is within a factor of 5 of overflow.
00117 *>  Underflow is harmless if the input data is 0 or exceeds
00118 *>     underflow_threshold / macheps.
00119 *> \endverbatim
00120 *>
00121 *  =====================================================================
00122       SUBROUTINE ZLAEV2( A, B, C, RT1, RT2, CS1, SN1 )
00123 *
00124 *  -- LAPACK auxiliary routine (version 3.4.0) --
00125 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00126 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00127 *     November 2011
00128 *
00129 *     .. Scalar Arguments ..
00130       DOUBLE PRECISION   CS1, RT1, RT2
00131       COMPLEX*16         A, B, C, SN1
00132 *     ..
00133 *
00134 * =====================================================================
00135 *
00136 *     .. Parameters ..
00137       DOUBLE PRECISION   ZERO
00138       PARAMETER          ( ZERO = 0.0D0 )
00139       DOUBLE PRECISION   ONE
00140       PARAMETER          ( ONE = 1.0D0 )
00141 *     ..
00142 *     .. Local Scalars ..
00143       DOUBLE PRECISION   T
00144       COMPLEX*16         W
00145 *     ..
00146 *     .. External Subroutines ..
00147       EXTERNAL           DLAEV2
00148 *     ..
00149 *     .. Intrinsic Functions ..
00150       INTRINSIC          ABS, DBLE, DCONJG
00151 *     ..
00152 *     .. Executable Statements ..
00153 *
00154       IF( ABS( B ).EQ.ZERO ) THEN
00155          W = ONE
00156       ELSE
00157          W = DCONJG( B ) / ABS( B )
00158       END IF
00159       CALL DLAEV2( DBLE( A ), ABS( B ), DBLE( C ), RT1, RT2, CS1, T )
00160       SN1 = W*T
00161       RETURN
00162 *
00163 *     End of ZLAEV2
00164 *
00165       END
 All Files Functions