150 SUBROUTINE zhbt21( UPLO, N, KA, KS, A, LDA, D, E, U, LDU, WORK,
159 INTEGER KA, KS, LDA, LDU, N
162 DOUBLE PRECISION D( * ), E( * ), RESULT( 2 ), RWORK( * )
163 COMPLEX*16 A( LDA, * ), U( LDU, * ), WORK( * )
169 COMPLEX*16 CZERO, CONE
170 parameter( czero = ( 0.0d+0, 0.0d+0 ),
171 $ cone = ( 1.0d+0, 0.0d+0 ) )
172 DOUBLE PRECISION ZERO, ONE
173 parameter( zero = 0.0d+0, one = 1.0d+0 )
178 INTEGER IKA, J, JC, JR
179 DOUBLE PRECISION ANORM, ULP, UNFL, WNORM
183 DOUBLE PRECISION DLAMCH, ZLANGE, ZLANHB, ZLANHP
184 EXTERNAL lsame, dlamch, zlange, zlanhb, zlanhp
190 INTRINSIC dble, dcmplx, max, min
201 ika = max( 0, min( n-1, ka ) )
203 IF( lsame( uplo,
'U' ) )
THEN
211 unfl = dlamch(
'Safe minimum' )
212 ulp = dlamch(
'Epsilon' )*dlamch(
'Base' )
220 anorm = max( zlanhb(
'1', cuplo, n, ika, a, lda, rwork ), unfl )
229 DO 10 jr = 1, min( ika+1, n+1-jc )
231 work( j ) = a( jr, jc )
233 DO 20 jr = ika + 2, n + 1 - jc
238 DO 30 jr = ika + 2, jc
242 DO 40 jr = min( ika, jc-1 ), 0, -1
244 work( j ) = a( ika+1-jr, jc )
250 CALL zhpr( cuplo, n, -d( j ), u( 1, j ), 1, work )
253 IF( n.GT.1 .AND. ks.EQ.1 )
THEN
255 CALL zhpr2( cuplo, n, -dcmplx( e( j ) ), u( 1, j ), 1,
256 $ u( 1, j+1 ), 1, work )
259 wnorm = zlanhp(
'1', cuplo, n, work, rwork )
261 IF( anorm.GT.wnorm )
THEN
262 result( 1 ) = ( wnorm / anorm ) / ( n*ulp )
264 IF( anorm.LT.one )
THEN
265 result( 1 ) = ( min( wnorm, n*anorm ) / anorm ) / ( n*ulp )
267 result( 1 ) = min( wnorm / anorm, dble( n ) ) / ( n*ulp )
275 CALL zgemm(
'N',
'C', n, n, n, cone, u, ldu, u, ldu, czero, work,
279 work( ( n+1 )*( j-1 )+1 ) = work( ( n+1 )*( j-1 )+1 ) - cone
282 result( 2 ) = min( zlange(
'1', n, n, work, n, rwork ),
283 $ dble( n ) ) / ( n*ulp )
subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM
subroutine zhpr2(uplo, n, alpha, x, incx, y, incy, ap)
ZHPR2
subroutine zhpr(uplo, n, alpha, x, incx, ap)
ZHPR
subroutine zhbt21(uplo, n, ka, ks, a, lda, d, e, u, ldu, work, rwork, result)
ZHBT21