137 SUBROUTINE dstt22( N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK,
145 INTEGER KBAND, LDU, LDWORK, M, N
148 DOUBLE PRECISION AD( * ), AE( * ), RESULT( 2 ), SD( * ),
149 $ se( * ), u( ldu, * ), work( ldwork, * )
155 DOUBLE PRECISION ZERO, ONE
156 parameter( zero = 0.0d0, one = 1.0d0 )
160 DOUBLE PRECISION ANORM, AUKJ, ULP, UNFL, WNORM
163 DOUBLE PRECISION DLAMCH, DLANGE, DLANSY
164 EXTERNAL dlamch, dlange, dlansy
170 INTRINSIC abs, dble, max, min
176 IF( n.LE.0 .OR. m.LE.0 )
179 unfl = dlamch(
'Safe minimum' )
180 ulp = dlamch(
'Epsilon' )
187 anorm = abs( ad( 1 ) ) + abs( ae( 1 ) )
189 anorm = max( anorm, abs( ad( j ) )+abs( ae( j ) )+
192 anorm = max( anorm, abs( ad( n ) )+abs( ae( n-1 ) ) )
194 anorm = abs( ad( 1 ) )
196 anorm = max( anorm, unfl )
204 aukj = ad( k )*u( k, j )
206 $ aukj = aukj + ae( k )*u( k+1, j )
208 $ aukj = aukj + ae( k-1 )*u( k-1, j )
209 work( i, j ) = work( i, j ) + u( k, i )*aukj
212 work( i, i ) = work( i, i ) - sd( i )
213 IF( kband.EQ.1 )
THEN
215 $ work( i, i-1 ) = work( i, i-1 ) - se( i-1 )
217 $ work( i, i+1 ) = work( i, i+1 ) - se( i )
221 wnorm = dlansy(
'1',
'L', m, work, m, work( 1, m+1 ) )
223 IF( anorm.GT.wnorm )
THEN
224 result( 1 ) = ( wnorm / anorm ) / ( m*ulp )
226 IF( anorm.LT.one )
THEN
227 result( 1 ) = ( min( wnorm, m*anorm ) / anorm ) / ( m*ulp )
229 result( 1 ) = min( wnorm / anorm, dble( m ) ) / ( m*ulp )
237 CALL dgemm(
'T',
'N', m, m, n, one, u, ldu, u, ldu, zero, work,
241 work( j, j ) = work( j, j ) - one
244 result( 2 ) = min( dble( m ), dlange(
'1', m, m, work, m, work( 1,
245 $ m+1 ) ) ) / ( m*ulp )
subroutine dstt22(n, m, kband, ad, ae, sd, se, u, ldu, work, ldwork, result)
DSTT22
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM