125 SUBROUTINE dlaqz1( A, LDA, B, LDB, SR1, SR2, SI, BETA1, BETA2,
130 INTEGER,
INTENT( IN ) :: LDA, LDB
131 DOUBLE PRECISION,
INTENT( IN ) :: A( LDA, * ), B( LDB, * ), SR1,
132 $ sr2, si, beta1, beta2
133 DOUBLE PRECISION,
INTENT( OUT ) :: V( * )
136 DOUBLE PRECISION :: ZERO, ONE, HALF
137 parameter( zero = 0.0d0, one = 1.0d0, half = 0.5d0 )
140 DOUBLE PRECISION :: W( 2 ), SAFMIN, SAFMAX, SCALE1, SCALE2
143 DOUBLE PRECISION,
EXTERNAL :: DLAMCH
144 LOGICAL,
EXTERNAL :: DISNAN
146 safmin = dlamch(
'SAFE MINIMUM' )
151 w( 1 ) = beta1*a( 1, 1 )-sr1*b( 1, 1 )
152 w( 2 ) = beta1*a( 2, 1 )-sr1*b( 2, 1 )
153 scale1 = sqrt( abs( w( 1 ) ) ) * sqrt( abs( w( 2 ) ) )
154 IF( scale1 .GE. safmin .AND. scale1 .LE. safmax )
THEN
155 w( 1 ) = w( 1 )/scale1
156 w( 2 ) = w( 2 )/scale1
161 w( 2 ) = w( 2 )/b( 2, 2 )
162 w( 1 ) = ( w( 1 )-b( 1, 2 )*w( 2 ) )/b( 1, 1 )
163 scale2 = sqrt( abs( w( 1 ) ) ) * sqrt( abs( w( 2 ) ) )
164 IF( scale2 .GE. safmin .AND. scale2 .LE. safmax )
THEN
165 w( 1 ) = w( 1 )/scale2
166 w( 2 ) = w( 2 )/scale2
171 v( 1 ) = beta2*( a( 1, 1 )*w( 1 )+a( 1, 2 )*w( 2 ) )-sr2*( b( 1,
172 $ 1 )*w( 1 )+b( 1, 2 )*w( 2 ) )
173 v( 2 ) = beta2*( a( 2, 1 )*w( 1 )+a( 2, 2 )*w( 2 ) )-sr2*( b( 2,
174 $ 1 )*w( 1 )+b( 2, 2 )*w( 2 ) )
175 v( 3 ) = beta2*( a( 3, 1 )*w( 1 )+a( 3, 2 )*w( 2 ) )-sr2*( b( 3,
176 $ 1 )*w( 1 )+b( 3, 2 )*w( 2 ) )
180 v( 1 ) = v( 1 )+si*si*b( 1, 1 )/scale1/scale2
184 IF( abs( v( 1 ) ).GT.safmax .OR. abs( v( 2 ) ) .GT. safmax .OR.
185 $ abs( v( 3 ) ).GT.safmax .OR. disnan( v( 1 ) ) .OR.
186 $ disnan( v( 2 ) ) .OR. disnan( v( 3 ) ) )
THEN
subroutine dlaqz1(a, lda, b, ldb, sr1, sr2, si, beta1, beta2, v)
DLAQZ1