LAPACK  3.9.0
LAPACK: Linear Algebra PACKage

◆ dlaqr1()

subroutine dlaqr1 ( integer  N,
double precision, dimension( ldh, * )  H,
integer  LDH,
double precision  SR1,
double precision  SI1,
double precision  SR2,
double precision  SI2,
double precision, dimension( * )  V 
)

DLAQR1 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 DLAQR1 + dependencies [TGZ] [ZIP] [TXT]

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

      (*)  K = (H - (sr1 + i*si1)*I)*(H - (sr2 + i*si2)*I)

      scaling to avoid overflows and most underflows. It
      is assumed that either

              1) sr1 = sr2 and si1 = -si2
          or
              2) si1 = si2 = 0.

      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 DOUBLE PRECISION 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]SR1
          SR1 is DOUBLE PRECISION
[in]SI1
          SI1 is DOUBLE PRECISION
[in]SR2
          SR2 is DOUBLE PRECISION
[in]SI2
          SI2 is DOUBLE PRECISION
              The shifts in (*).
[out]V
          V is DOUBLE PRECISION 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 123 of file dlaqr1.f.

123 *
124 * -- LAPACK auxiliary routine (version 3.7.1) --
125 * -- LAPACK is a software package provided by Univ. of Tennessee, --
126 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
127 * June 2017
128 *
129 * .. Scalar Arguments ..
130  DOUBLE PRECISION SI1, SI2, SR1, SR2
131  INTEGER LDH, N
132 * ..
133 * .. Array Arguments ..
134  DOUBLE PRECISION H( LDH, * ), V( * )
135 * ..
136 *
137 * ================================================================
138 *
139 * .. Parameters ..
140  DOUBLE PRECISION ZERO
141  parameter( zero = 0.0d0 )
142 * ..
143 * .. Local Scalars ..
144  DOUBLE PRECISION H21S, H31S, S
145 * ..
146 * .. Intrinsic Functions ..
147  INTRINSIC abs
148 * ..
149 * .. Executable Statements ..
150 *
151 * Quick return if possible
152 *
153  IF( n.NE.2 .AND. n.NE.3 ) THEN
154  RETURN
155  END IF
156 *
157  IF( n.EQ.2 ) THEN
158  s = abs( h( 1, 1 )-sr2 ) + abs( si2 ) + abs( h( 2, 1 ) )
159  IF( s.EQ.zero ) THEN
160  v( 1 ) = zero
161  v( 2 ) = zero
162  ELSE
163  h21s = h( 2, 1 ) / s
164  v( 1 ) = h21s*h( 1, 2 ) + ( h( 1, 1 )-sr1 )*
165  $ ( ( h( 1, 1 )-sr2 ) / s ) - si1*( si2 / s )
166  v( 2 ) = h21s*( h( 1, 1 )+h( 2, 2 )-sr1-sr2 )
167  END IF
168  ELSE
169  s = abs( h( 1, 1 )-sr2 ) + abs( si2 ) + abs( h( 2, 1 ) ) +
170  $ abs( h( 3, 1 ) )
171  IF( s.EQ.zero ) THEN
172  v( 1 ) = zero
173  v( 2 ) = zero
174  v( 3 ) = zero
175  ELSE
176  h21s = h( 2, 1 ) / s
177  h31s = h( 3, 1 ) / s
178  v( 1 ) = ( h( 1, 1 )-sr1 )*( ( h( 1, 1 )-sr2 ) / s ) -
179  $ si1*( si2 / s ) + h( 1, 2 )*h21s + h( 1, 3 )*h31s
180  v( 2 ) = h21s*( h( 1, 1 )+h( 2, 2 )-sr1-sr2 ) +
181  $ h( 2, 3 )*h31s
182  v( 3 ) = h31s*( h( 1, 1 )+h( 3, 3 )-sr1-sr2 ) +
183  $ h21s*h( 3, 2 )
184  END IF
185  END IF
Here is the caller graph for this function: