127 SUBROUTINE dstt21( N, KBAND, AD, AE, SD, SE, U, LDU, WORK,
136 INTEGER KBAND, LDU, N
139 DOUBLE PRECISION AD( * ), AE( * ), RESULT( 2 ), SD( * ),
140 $ se( * ), u( ldu, * ), work( * )
146 DOUBLE PRECISION ZERO, ONE
147 parameter ( zero = 0.0d0, one = 1.0d0 )
151 DOUBLE PRECISION ANORM, TEMP1, TEMP2, ULP, UNFL, WNORM
154 DOUBLE PRECISION DLAMCH, DLANGE, DLANSY
155 EXTERNAL dlamch, dlange, dlansy
161 INTRINSIC abs, dble, max, min
172 unfl = dlamch(
'Safe minimum' )
173 ulp = dlamch(
'Precision' )
179 CALL dlaset(
'Full', n, n, zero, zero, work, n )
185 work( ( n+1 )*( j-1 )+1 ) = ad( j )
186 work( ( n+1 )*( j-1 )+2 ) = ae( j )
187 temp2 = abs( ae( j ) )
188 anorm = max( anorm, abs( ad( j ) )+temp1+temp2 )
192 work( n**2 ) = ad( n )
193 anorm = max( anorm, abs( ad( n ) )+temp1, unfl )
198 CALL dsyr(
'L', n, -sd( j ), u( 1, j ), 1, work, n )
201 IF( n.GT.1 .AND. kband.EQ.1 )
THEN
203 CALL dsyr2(
'L', n, -se( j ), u( 1, j ), 1, u( 1, j+1 ), 1,
208 wnorm = dlansy(
'1',
'L', n, work, n, work( n**2+1 ) )
210 IF( anorm.GT.wnorm )
THEN
211 result( 1 ) = ( wnorm / anorm ) / ( n*ulp )
213 IF( anorm.LT.one )
THEN
214 result( 1 ) = ( min( wnorm, n*anorm ) / anorm ) / ( n*ulp )
216 result( 1 ) = min( wnorm / anorm, dble( n ) ) / ( n*ulp )
224 CALL dgemm(
'N',
'C', n, n, n, one, u, ldu, u, ldu, zero, work,
228 work( ( n+1 )*( j-1 )+1 ) = work( ( n+1 )*( j-1 )+1 ) - one
231 result( 2 ) = min( dble( n ), dlange(
'1', n, n, work, n,
232 $ work( n**2+1 ) ) ) / ( n*ulp )
subroutine dlaset(UPLO, M, N, ALPHA, BETA, A, LDA)
DLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...
subroutine dsyr(UPLO, N, ALPHA, X, INCX, A, LDA)
DSYR
subroutine dgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
DGEMM
subroutine dstt21(N, KBAND, AD, AE, SD, SE, U, LDU, WORK, RESULT)
DSTT21
subroutine dsyr2(UPLO, N, ALPHA, X, INCX, Y, INCY, A, LDA)
DSYR2