1 *> \brief \b CLAQR1 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 CLAQR1 + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/claqr1.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/claqr1.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/claqr1.f">
21 * SUBROUTINE CLAQR1( N, H, LDH, S1, S2, V )
23 * .. Scalar Arguments ..
27 * .. Array Arguments ..
28 * COMPLEX H( LDH, * ), V( * )
37 *> Given a 2-by-2 or 3-by-3 matrix H, CLAQR1 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 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 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 complexOTHERauxiliary
101 *> \par Contributors:
104 *> Karen Braman and Ralph Byers, Department of Mathematics,
105 *> University of Kansas, USA
107 * =====================================================================
108 SUBROUTINE CLAQR1( 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 H( LDH, * ), V( * )
123 * ================================================================
127 PARAMETER ( ZERO = ( 0.0e0, 0.0e0 ) )
129 PARAMETER ( RZERO = 0.0e0 )
131 * .. Local Scalars ..
132 COMPLEX CDUM, H21S, H31S
135 * .. Intrinsic Functions ..
136 INTRINSIC ABS, AIMAG, REAL
138 * .. Statement Functions ..
141 * .. Statement Function definitions ..
142 CABS1( CDUM ) = ABS( REAL( CDUM ) ) + ABS( AIMAG( 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 )