 LAPACK  3.10.0 LAPACK: Linear Algebra PACKage

◆ zlaqr1()

 subroutine zlaqr1 ( integer N, complex*16, dimension( ldh, * ) H, integer LDH, complex*16 S1, complex*16 S2, complex*16, dimension( * ) V )

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.

Purpose:
Given a 2-by-2 or 3-by-3 matrix H, ZLAQR1 sets v to a
scalar multiple of the first column of the product

(*)  K = (H - s1*I)*(H - s2*I)

scaling to avoid overflows and most underflows.

This is useful for starting double implicit shift bulges
in the QR algorithm.
Parameters
 [in] N N is INTEGER Order of the matrix H. N must be either 2 or 3. [in] H H is COMPLEX*16 array, dimension (LDH,N) The 2-by-2 or 3-by-3 matrix H in (*). [in] LDH LDH is INTEGER The leading dimension of H as declared in the calling procedure. LDH >= N [in] S1 S1 is COMPLEX*16 [in] S2 S2 is COMPLEX*16 S1 and S2 are the shifts defining K in (*) above. [out] V V is COMPLEX*16 array, dimension (N) A scalar multiple of the first column of the matrix K in (*).
Contributors:
Karen Braman and Ralph Byers, Department of Mathematics, University of Kansas, USA

Definition at line 106 of file zlaqr1.f.

107 *
108 * -- LAPACK auxiliary routine --
109 * -- LAPACK is a software package provided by Univ. of Tennessee, --
110 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
111 *
112 * .. Scalar Arguments ..
113  COMPLEX*16 S1, S2
114  INTEGER LDH, N
115 * ..
116 * .. Array Arguments ..
117  COMPLEX*16 H( LDH, * ), V( * )
118 * ..
119 *
120 * ================================================================
121 *
122 * .. Parameters ..
123  COMPLEX*16 ZERO
124  parameter( zero = ( 0.0d0, 0.0d0 ) )
125  DOUBLE PRECISION RZERO
126  parameter( rzero = 0.0d0 )
127 * ..
128 * .. Local Scalars ..
129  COMPLEX*16 CDUM, H21S, H31S
130  DOUBLE PRECISION S
131 * ..
132 * .. Intrinsic Functions ..
133  INTRINSIC abs, dble, dimag
134 * ..
135 * .. Statement Functions ..
136  DOUBLE PRECISION CABS1
137 * ..
138 * .. Statement Function definitions ..
139  cabs1( cdum ) = abs( dble( cdum ) ) + abs( dimag( cdum ) )
140 * ..
141 * .. Executable Statements ..
142 *
143 * Quick return if possible
144 *
145  IF( n.NE.2 .AND. n.NE.3 ) THEN
146  RETURN
147  END IF
148 *
149  IF( n.EQ.2 ) THEN
150  s = cabs1( h( 1, 1 )-s2 ) + cabs1( h( 2, 1 ) )
151  IF( s.EQ.rzero ) THEN
152  v( 1 ) = zero
153  v( 2 ) = zero
154  ELSE
155  h21s = h( 2, 1 ) / s
156  v( 1 ) = h21s*h( 1, 2 ) + ( h( 1, 1 )-s1 )*
157  \$ ( ( h( 1, 1 )-s2 ) / s )
158  v( 2 ) = h21s*( h( 1, 1 )+h( 2, 2 )-s1-s2 )
159  END IF
160  ELSE
161  s = cabs1( h( 1, 1 )-s2 ) + cabs1( h( 2, 1 ) ) +
162  \$ cabs1( h( 3, 1 ) )
163  IF( s.EQ.zero ) THEN
164  v( 1 ) = zero
165  v( 2 ) = zero
166  v( 3 ) = zero
167  ELSE
168  h21s = h( 2, 1 ) / s
169  h31s = h( 3, 1 ) / s
170  v( 1 ) = ( h( 1, 1 )-s1 )*( ( h( 1, 1 )-s2 ) / s ) +
171  \$ h( 1, 2 )*h21s + h( 1, 3 )*h31s
172  v( 2 ) = h21s*( h( 1, 1 )+h( 2, 2 )-s1-s2 ) + h( 2, 3 )*h31s
173  v( 3 ) = h31s*( h( 1, 1 )+h( 3, 3 )-s1-s2 ) + h21s*h( 3, 2 )
174  END IF
175  END IF
Here is the caller graph for this function: