137 SUBROUTINE sstt22( N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK,
145 INTEGER KBAND, LDU, LDWORK, M, N
148 REAL AD( * ), AE( * ), RESULT( 2 ), SD( * ),
149 $ se( * ), u( ldu, * ), work( ldwork, * )
156 parameter( zero = 0.0e0, one = 1.0e0 )
160 REAL ANORM, AUKJ, ULP, UNFL, WNORM
163 REAL SLAMCH, SLANGE, SLANSY
164 EXTERNAL slamch, slange, slansy
170 INTRINSIC abs, max, min, real
176 IF( n.LE.0 .OR. m.LE.0 )
179 unfl = slamch(
'Safe minimum' )
180 ulp = slamch(
'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 = slansy(
'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, real( m ) ) / ( m*ulp )
237 CALL sgemm(
'T',
'N', m, m, n, one, u, ldu, u, ldu, zero, work,
241 work( j, j ) = work( j, j ) - one
244 result( 2 ) = min( real( m ), slange(
'1', m, m, work, m, work( 1,
245 $ m+1 ) ) ) / ( m*ulp )
subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SGEMM
subroutine sstt22(n, m, kband, ad, ae, sd, se, u, ldu, work, ldwork, result)
SSTT22