145 SUBROUTINE cstt22( N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK,
146 $ ldwork, rwork, result )
154 INTEGER KBAND, LDU, LDWORK, M, N
157 REAL AD( * ), AE( * ), RESULT( 2 ), RWORK( * ),
159 COMPLEX U( ldu, * ), WORK( ldwork, * )
166 parameter ( zero = 0.0e0, one = 1.0e0 )
168 parameter ( czero = ( 0.0e+0, 0.0e+0 ),
169 $ cone = ( 1.0e+0, 0.0e+0 ) )
173 REAL ANORM, ULP, UNFL, WNORM
177 REAL CLANGE, CLANSY, SLAMCH
178 EXTERNAL clange, clansy, slamch
184 INTRINSIC abs, max, min, real
190 IF( n.LE.0 .OR. m.LE.0 )
193 unfl = slamch(
'Safe minimum' )
194 ulp = slamch(
'Epsilon' )
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 = clansy(
'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,
REAL( M ) ) / ( M*ULP )
251 CALL cgemm(
'T',
'N', m, m, n, cone, u, ldu, u, ldu, czero, work,
255 work( j, j ) = work( j, j ) - one
258 result( 2 ) = min(
REAL( M ), CLANGE(
'1', m, m, work, m,
259 $ rwork ) ) / ( m*ulp )
subroutine cstt22(N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK, LDWORK, RWORK, RESULT)
CSTT22
subroutine cgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
CGEMM