1
*> \brief \b ZLAQR1 sets a scalar multiple of the first column of the product of 2-by-2 or 3-by-3 matrix H and specified shifts.
3
* =========== DOCUMENTATION ===========
5
* Online html documentation available at
6
* http://www.netlib.org/lapack/explore-html/
9
*> Download ZLAQR1 + dependencies
10
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqr1.f">
12
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqr1.f">
14
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqr1.f">
21
* SUBROUTINE ZLAQR1( N, H, LDH, S1, S2, V )
23
* .. Scalar Arguments ..
27
* .. Array Arguments ..
28
* COMPLEX*16 H( LDH, * ), V( * )
37
*> Given a 2-by-2 or 3-by-3 matrix H, ZLAQR1 sets v to a
38
*> scalar multiple of the first column of the product
40
*> (*) K = (H - s1*I)*(H - s2*I)
42
*> scaling to avoid overflows and most underflows.
44
*> This is useful for starting double implicit shift bulges
45
*> in the QR algorithm.
54
*> Order of the matrix H. N must be either 2 or 3.
59
*> H is COMPLEX*16 array of dimension (LDH,N)
60
*> The 2-by-2 or 3-by-3 matrix H in (*).
66
*> The leading dimension of H as declared in
67
*> the calling procedure. LDH.GE.N
79
*> S1 and S2 are the shifts defining K in (*) above.
84
*> V is COMPLEX*16 array of dimension N
85
*> A scalar multiple of the first column of the
92
*> \author Univ. of Tennessee
93
*> \author Univ. of California Berkeley
94
*> \author Univ. of Colorado Denver
97
*> \date September 2012
99
*> \ingroup complex16OTHERauxiliary
101
*> \par Contributors:
104
*> Karen Braman and Ralph Byers, Department of Mathematics,
105
*> University of Kansas, USA
107
* =====================================================================
108
SUBROUTINE ZLAQR1( N, H, LDH, S1, S2, V )
110
* -- LAPACK auxiliary routine (version 3.4.2) --
111
* -- LAPACK is a software package provided by Univ. of Tennessee, --
112
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
115
* .. Scalar Arguments ..
119
* .. Array Arguments ..
120
COMPLEX*16 H( LDH, * ), V( * )
123
* ================================================================
127
PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ) )
128
DOUBLE PRECISION RZERO
129
PARAMETER ( RZERO = 0.0d0 )
131
* .. Local Scalars ..
132
COMPLEX*16 CDUM, H21S, H31S
135
* .. Intrinsic Functions ..
136
INTRINSIC ABS, DBLE, DIMAG
138
* .. Statement Functions ..
139
DOUBLE PRECISION CABS1
141
* .. Statement Function definitions ..
142
CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
144
* .. Executable Statements ..
146
S = CABS1( H( 1, 1 )-S2 ) + CABS1( H( 2, 1 ) )
147
IF( S.EQ.RZERO ) THEN
152
V( 1 ) = H21S*H( 1, 2 ) + ( H( 1, 1 )-S1 )*
153
$ ( ( H( 1, 1 )-S2 ) / S )
154
V( 2 ) = H21S*( H( 1, 1 )+H( 2, 2 )-S1-S2 )
157
S = CABS1( H( 1, 1 )-S2 ) + CABS1( H( 2, 1 ) ) +
166
V( 1 ) = ( H( 1, 1 )-S1 )*( ( H( 1, 1 )-S2 ) / S ) +
167
$ H( 1, 2 )*H21S + H( 1, 3 )*H31S
168
V( 2 ) = H21S*( H( 1, 1 )+H( 2, 2 )-S1-S2 ) + H( 2, 3 )*H31S
169
V( 3 ) = H31S*( H( 1, 1 )+H( 3, 3 )-S1-S2 ) + H21S*H( 3, 2 )