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
184 INTRINSIC abs, max, min, real
190 IF( n.LE.0 .OR. m.LE.0 )
193 unfl =
slamch(
'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 =
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 )