143 SUBROUTINE zstt22( N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK,
144 $ LDWORK, RWORK, RESULT )
151 INTEGER KBAND, LDU, LDWORK, M, N
154 DOUBLE PRECISION AD( * ), AE( * ), RESULT( 2 ), RWORK( * ),
156 COMPLEX*16 U( LDU, * ), WORK( LDWORK, * )
162 DOUBLE PRECISION ZERO, ONE
163 parameter( zero = 0.0d0, one = 1.0d0 )
164 COMPLEX*16 CZERO, CONE
165 parameter( czero = ( 0.0d+0, 0.0d+0 ),
166 $ cone = ( 1.0d+0, 0.0d+0 ) )
170 DOUBLE PRECISION ANORM, ULP, UNFL, WNORM
174 DOUBLE PRECISION DLAMCH, ZLANGE, ZLANSY
175 EXTERNAL dlamch, zlange, zlansy
181 INTRINSIC abs, dble, max, min
187 IF( n.LE.0 .OR. m.LE.0 )
190 unfl = dlamch(
'Safe minimum' )
191 ulp = dlamch(
'Epsilon' )
198 anorm = abs( ad( 1 ) ) + abs( ae( 1 ) )
200 anorm = max( anorm, abs( ad( j ) )+abs( ae( j ) )+
203 anorm = max( anorm, abs( ad( n ) )+abs( ae( n-1 ) ) )
205 anorm = abs( ad( 1 ) )
207 anorm = max( anorm, unfl )
215 aukj = ad( k )*u( k, j )
217 $ aukj = aukj + ae( k )*u( k+1, j )
219 $ aukj = aukj + ae( k-1 )*u( k-1, j )
220 work( i, j ) = work( i, j ) + u( k, i )*aukj
223 work( i, i ) = work( i, i ) - sd( i )
224 IF( kband.EQ.1 )
THEN
226 $ work( i, i-1 ) = work( i, i-1 ) - se( i-1 )
228 $ work( i, i+1 ) = work( i, i+1 ) - se( i )
232 wnorm = zlansy(
'1',
'L', m, work, m, rwork )
234 IF( anorm.GT.wnorm )
THEN
235 result( 1 ) = ( wnorm / anorm ) / ( m*ulp )
237 IF( anorm.LT.one )
THEN
238 result( 1 ) = ( min( wnorm, m*anorm ) / anorm ) / ( m*ulp )
240 result( 1 ) = min( wnorm / anorm, dble( m ) ) / ( m*ulp )
248 CALL zgemm(
'T',
'N', m, m, n, cone, u, ldu, u, ldu, czero, work,
252 work( j, j ) = work( j, j ) - one
255 result( 2 ) = min( dble( m ), zlange(
'1', m, m, work, m,
256 $ rwork ) ) / ( m*ulp )
subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM
subroutine zstt22(n, m, kband, ad, ae, sd, se, u, ldu, work, ldwork, rwork, result)
ZSTT22