145 SUBROUTINE dsbt21( UPLO, N, KA, KS, A, LDA, D, E, U, LDU, WORK,
154 INTEGER KA, KS, LDA, LDU, N
157 DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), RESULT( 2 ),
158 $ u( ldu, * ), work( * )
164 DOUBLE PRECISION ZERO, ONE
165 parameter( zero = 0.0d0, one = 1.0d0 )
170 INTEGER IKA, J, JC, JR, LW
171 DOUBLE PRECISION ANORM, ULP, UNFL, WNORM
175 DOUBLE PRECISION DLAMCH, DLANGE, DLANSB, DLANSP
176 EXTERNAL lsame, dlamch, dlange, dlansb, dlansp
182 INTRINSIC dble, max, min
193 ika = max( 0, min( n-1, ka ) )
194 lw = ( n*( n+1 ) ) / 2
196 IF( lsame( uplo,
'U' ) )
THEN
204 unfl = dlamch(
'Safe minimum' )
205 ulp = dlamch(
'Epsilon' )*dlamch(
'Base' )
213 anorm = max( dlansb(
'1', cuplo, n, ika, a, lda, work ), unfl )
222 DO 10 jr = 1, min( ika+1, n+1-jc )
224 work( j ) = a( jr, jc )
226 DO 20 jr = ika + 2, n + 1 - jc
231 DO 30 jr = ika + 2, jc
235 DO 40 jr = min( ika, jc-1 ), 0, -1
237 work( j ) = a( ika+1-jr, jc )
243 CALL dspr( cuplo, n, -d( j ), u( 1, j ), 1, work )
246 IF( n.GT.1 .AND. ks.EQ.1 )
THEN
248 CALL dspr2( cuplo, n, -e( j ), u( 1, j ), 1, u( 1, j+1 ), 1,
252 wnorm = dlansp(
'1', cuplo, n, work, work( lw+1 ) )
254 IF( anorm.GT.wnorm )
THEN
255 result( 1 ) = ( wnorm / anorm ) / ( n*ulp )
257 IF( anorm.LT.one )
THEN
258 result( 1 ) = ( min( wnorm, n*anorm ) / anorm ) / ( n*ulp )
260 result( 1 ) = min( wnorm / anorm, dble( n ) ) / ( n*ulp )
268 CALL dgemm(
'N',
'C', n, n, n, one, u, ldu, u, ldu, zero, work,
272 work( ( n+1 )*( j-1 )+1 ) = work( ( n+1 )*( j-1 )+1 ) - one
275 result( 2 ) = min( dlange(
'1', n, n, work, n, work( n**2+1 ) ),
276 $ dble( n ) ) / ( n*ulp )
subroutine dsbt21(uplo, n, ka, ks, a, lda, d, e, u, ldu, work, result)
DSBT21
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dspr2(uplo, n, alpha, x, incx, y, incy, ap)
DSPR2
subroutine dspr(uplo, n, alpha, x, incx, ap)
DSPR