150 SUBROUTINE chbt21( UPLO, N, KA, KS, A, LDA, D, E, U, LDU, WORK,
160 INTEGER KA, KS, LDA, LDU, N
163 REAL D( * ), E( * ), RESULT( 2 ), RWORK( * )
164 COMPLEX A( lda, * ), U( ldu, * ), WORK( * )
171 parameter ( czero = ( 0.0e+0, 0.0e+0 ),
172 $ cone = ( 1.0e+0, 0.0e+0 ) )
174 parameter ( zero = 0.0e+0, one = 1.0e+0 )
179 INTEGER IKA, J, JC, JR
180 REAL ANORM, ULP, UNFL, WNORM
184 REAL CLANGE, CLANHB, CLANHP, SLAMCH
185 EXTERNAL lsame, clange, clanhb, clanhp, slamch
191 INTRINSIC cmplx, max, min, real
202 ika = max( 0, min( n-1, ka ) )
204 IF( lsame( uplo,
'U' ) )
THEN
212 unfl = slamch(
'Safe minimum' )
213 ulp = slamch(
'Epsilon' )*slamch(
'Base' )
221 anorm = max( clanhb(
'1', cuplo, n, ika, a, lda, rwork ), unfl )
230 DO 10 jr = 1, min( ika+1, n+1-jc )
232 work( j ) = a( jr, jc )
234 DO 20 jr = ika + 2, n + 1 - jc
239 DO 30 jr = ika + 2, jc
243 DO 40 jr = min( ika, jc-1 ), 0, -1
245 work( j ) = a( ika+1-jr, jc )
251 CALL chpr( cuplo, n, -d( j ), u( 1, j ), 1, work )
254 IF( n.GT.1 .AND. ks.EQ.1 )
THEN
256 CALL chpr2( cuplo, n, -cmplx( e( j ) ), u( 1, j ), 1,
257 $ u( 1, j+1 ), 1, work )
260 wnorm = clanhp(
'1', cuplo, n, work, rwork )
262 IF( anorm.GT.wnorm )
THEN
263 result( 1 ) = ( wnorm / anorm ) / ( n*ulp )
265 IF( anorm.LT.one )
THEN
266 result( 1 ) = ( min( wnorm, n*anorm ) / anorm ) / ( n*ulp )
268 result( 1 ) = min( wnorm / anorm,
REAL( N ) ) / ( N*ULP )
276 CALL cgemm(
'N',
'C', n, n, n, cone, u, ldu, u, ldu, czero, work,
280 work( ( n+1 )*( j-1 )+1 ) = work( ( n+1 )*( j-1 )+1 ) - cone
283 result( 2 ) = min( clange(
'1', n, n, work, n, rwork ),
284 $
REAL( N ) ) / ( N*ULP )
subroutine chbt21(UPLO, N, KA, KS, A, LDA, D, E, U, LDU, WORK, RWORK, RESULT)
CHBT21
subroutine chpr(UPLO, N, ALPHA, X, INCX, AP)
CHPR
subroutine chpr2(UPLO, N, ALPHA, X, INCX, Y, INCY, AP)
CHPR2
subroutine cgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
CGEMM