LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ zlaev2()

subroutine zlaev2 ( complex*16 a,
complex*16 b,
complex*16 c,
double precision rt1,
double precision rt2,
double precision cs1,
complex*16 sn1 )

ZLAEV2 computes the eigenvalues and eigenvectors of a 2-by-2 symmetric/Hermitian matrix.

Download ZLAEV2 + dependencies [TGZ] [ZIP] [TXT]

Purpose:
!>
!> ZLAEV2 computes the eigendecomposition of a 2-by-2 Hermitian matrix
!>    [  A         B  ]
!>    [  CONJG(B)  C  ].
!> On return, RT1 is the eigenvalue of larger absolute value, RT2 is the
!> eigenvalue of smaller absolute value, and (CS1,SN1) is the unit right
!> eigenvector for RT1, giving the decomposition
!>
!> [ CS1  CONJG(SN1) ] [    A     B ] [ CS1 -CONJG(SN1) ] = [ RT1  0  ]
!> [-SN1     CS1     ] [ CONJG(B) C ] [ SN1     CS1     ]   [  0  RT2 ].
!> 
Parameters
[in]A
!>          A is COMPLEX*16
!>         The (1,1) element of the 2-by-2 matrix.
!> 
[in]B
!>          B is COMPLEX*16
!>         The (1,2) element and the conjugate of the (2,1) element of
!>         the 2-by-2 matrix.
!> 
[in]C
!>          C is COMPLEX*16
!>         The (2,2) element of the 2-by-2 matrix.
!> 
[out]RT1
!>          RT1 is DOUBLE PRECISION
!>         The eigenvalue of larger absolute value.
!> 
[out]RT2
!>          RT2 is DOUBLE PRECISION
!>         The eigenvalue of smaller absolute value.
!> 
[out]CS1
!>          CS1 is DOUBLE PRECISION
!> 
[out]SN1
!>          SN1 is COMPLEX*16
!>         The vector (CS1, SN1) is a unit right eigenvector for RT1.
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Further Details:
!>
!>  RT1 is accurate to a few ulps barring over/underflow.
!>
!>  RT2 may be inaccurate if there is massive cancellation in the
!>  determinant A*C-B*B; higher precision or correctly rounded or
!>  correctly truncated arithmetic would be needed to compute RT2
!>  accurately in all cases.
!>
!>  CS1 and SN1 are accurate to a few ulps barring over/underflow.
!>
!>  Overflow is possible only if RT1 is within a factor of 5 of overflow.
!>  Underflow is harmless if the input data is 0 or exceeds
!>     underflow_threshold / macheps.
!> 

Definition at line 118 of file zlaev2.f.

119*
120* -- LAPACK auxiliary routine --
121* -- LAPACK is a software package provided by Univ. of Tennessee, --
122* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
123*
124* .. Scalar Arguments ..
125 DOUBLE PRECISION CS1, RT1, RT2
126 COMPLEX*16 A, B, C, SN1
127* ..
128*
129* =====================================================================
130*
131* .. Parameters ..
132 DOUBLE PRECISION ZERO
133 parameter( zero = 0.0d0 )
134 DOUBLE PRECISION ONE
135 parameter( one = 1.0d0 )
136* ..
137* .. Local Scalars ..
138 DOUBLE PRECISION T
139 COMPLEX*16 W
140* ..
141* .. External Subroutines ..
142 EXTERNAL dlaev2
143* ..
144* .. Intrinsic Functions ..
145 INTRINSIC abs, dble, dconjg
146* ..
147* .. Executable Statements ..
148*
149 IF( abs( b ).EQ.zero ) THEN
150 w = one
151 ELSE
152 w = dconjg( b ) / abs( b )
153 END IF
154 CALL dlaev2( dble( a ), abs( b ), dble( c ), rt1, rt2, cs1, t )
155 sn1 = w*t
156 RETURN
157*
158* End of ZLAEV2
159*
subroutine dlaev2(a, b, c, rt1, rt2, cs1, sn1)
DLAEV2 computes the eigenvalues and eigenvectors of a 2-by-2 symmetric/Hermitian matrix.
Definition dlaev2.f:118
Here is the call graph for this function: