LAPACK  3.8.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.

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

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.GE.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 (*).
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
June 2017
Contributors:
Karen Braman and Ralph Byers, Department of Mathematics, University of Kansas, USA

Definition at line 109 of file zlaqr1.f.

109 *
110 * -- LAPACK auxiliary routine (version 3.7.1) --
111 * -- LAPACK is a software package provided by Univ. of Tennessee, --
112 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
113 * June 2017
114 *
115 * .. Scalar Arguments ..
116  COMPLEX*16 s1, s2
117  INTEGER ldh, n
118 * ..
119 * .. Array Arguments ..
120  COMPLEX*16 h( ldh, * ), v( * )
121 * ..
122 *
123 * ================================================================
124 *
125 * .. Parameters ..
126  COMPLEX*16 zero
127  parameter( zero = ( 0.0d0, 0.0d0 ) )
128  DOUBLE PRECISION rzero
129  parameter( rzero = 0.0d0 )
130 * ..
131 * .. Local Scalars ..
132  COMPLEX*16 cdum, h21s, h31s
133  DOUBLE PRECISION s
134 * ..
135 * .. Intrinsic Functions ..
136  INTRINSIC abs, dble, dimag
137 * ..
138 * .. Statement Functions ..
139  DOUBLE PRECISION cabs1
140 * ..
141 * .. Statement Function definitions ..
142  cabs1( cdum ) = abs( dble( cdum ) ) + abs( dimag( cdum ) )
143 * ..
144 * .. Executable Statements ..
145  IF( n.EQ.2 ) THEN
146  s = cabs1( h( 1, 1 )-s2 ) + cabs1( h( 2, 1 ) )
147  IF( s.EQ.rzero ) THEN
148  v( 1 ) = zero
149  v( 2 ) = zero
150  ELSE
151  h21s = h( 2, 1 ) / s
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 )
155  END IF
156  ELSE
157  s = cabs1( h( 1, 1 )-s2 ) + cabs1( h( 2, 1 ) ) +
158  $ cabs1( h( 3, 1 ) )
159  IF( s.EQ.zero ) THEN
160  v( 1 ) = zero
161  v( 2 ) = zero
162  v( 3 ) = zero
163  ELSE
164  h21s = h( 2, 1 ) / s
165  h31s = h( 3, 1 ) / s
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 )
170  END IF
171  END IF
Here is the caller graph for this function: