145 SUBROUTINE zstt22( N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK,
146 $ ldwork, rwork, result )
154 INTEGER kband, ldu, ldwork, m, n
157 DOUBLE PRECISION ad( * ), ae( * ), result( 2 ), rwork( * ),
159 COMPLEX*16 u( ldu, * ), work( ldwork, * )
165 DOUBLE PRECISION zero, one
166 parameter( zero = 0.0d0, one = 1.0d0 )
167 COMPLEX*16 czero, cone
168 parameter( czero = ( 0.0d+0, 0.0d+0 ),
169 $ cone = ( 1.0d+0, 0.0d+0 ) )
173 DOUBLE PRECISION anorm, ulp, unfl, wnorm
184 INTRINSIC abs, dble, max, min
190 IF( n.LE.0 .OR. m.LE.0 )
193 unfl =
dlamch(
'Safe minimum' )
201 anorm = abs( ad( 1 ) ) + abs( ae( 1 ) )
203 anorm = max( anorm, abs( ad( j ) )+abs( ae( j ) )+
206 anorm = max( anorm, abs( ad( n ) )+abs( ae( n-1 ) ) )
208 anorm = abs( ad( 1 ) )
210 anorm = max( anorm, unfl )
218 aukj = ad( k )*u( k, j )
220 $ aukj = aukj + ae( k )*u( k+1, j )
222 $ aukj = aukj + ae( k-1 )*u( k-1, j )
223 work( i, j ) = work( i, j ) + u( k, i )*aukj
226 work( i, i ) = work( i, i ) - sd( i )
227 IF( kband.EQ.1 )
THEN
229 $ work( i, i-1 ) = work( i, i-1 ) - se( i-1 )
231 $ work( i, i+1 ) = work( i, i+1 ) - se( i )
235 wnorm =
zlansy(
'1',
'L', m, work, m, rwork )
237 IF( anorm.GT.wnorm )
THEN
238 result( 1 ) = ( wnorm / anorm ) / ( m*ulp )
240 IF( anorm.LT.one )
THEN
241 result( 1 ) = ( min( wnorm, m*anorm ) / anorm ) / ( m*ulp )
243 result( 1 ) = min( wnorm / anorm, dble( m ) ) / ( m*ulp )
251 CALL
zgemm(
'T',
'N', m, m, n, cone, u, ldu, u, ldu, czero, work,
255 work( j, j ) = work( j, j ) - one
258 result( 2 ) = min( dble( m ),
zlange(
'1', m, m, work, m,
259 $ rwork ) ) / ( m*ulp )