125 SUBROUTINE dstt21( N, KBAND, AD, AE, SD, SE, U, LDU, WORK,
133 INTEGER KBAND, LDU, N
136 DOUBLE PRECISION AD( * ), AE( * ), RESULT( 2 ), SD( * ),
137 $ se( * ), u( ldu, * ), work( * )
143 DOUBLE PRECISION ZERO, ONE
144 parameter( zero = 0.0d0, one = 1.0d0 )
148 DOUBLE PRECISION ANORM, TEMP1, TEMP2, ULP, UNFL, WNORM
151 DOUBLE PRECISION DLAMCH, DLANGE, DLANSY
152 EXTERNAL dlamch, dlange, dlansy
158 INTRINSIC abs, dble, max, min
169 unfl = dlamch(
'Safe minimum' )
170 ulp = dlamch(
'Precision' )
176 CALL dlaset(
'Full', n, n, zero, zero, work, n )
182 work( ( n+1 )*( j-1 )+1 ) = ad( j )
183 work( ( n+1 )*( j-1 )+2 ) = ae( j )
184 temp2 = abs( ae( j ) )
185 anorm = max( anorm, abs( ad( j ) )+temp1+temp2 )
189 work( n**2 ) = ad( n )
190 anorm = max( anorm, abs( ad( n ) )+temp1, unfl )
195 CALL dsyr(
'L', n, -sd( j ), u( 1, j ), 1, work, n )
198 IF( n.GT.1 .AND. kband.EQ.1 )
THEN
200 CALL dsyr2(
'L', n, -se( j ), u( 1, j ), 1, u( 1, j+1 ), 1,
205 wnorm = dlansy(
'1',
'L', n, work, n, work( n**2+1 ) )
207 IF( anorm.GT.wnorm )
THEN
208 result( 1 ) = ( wnorm / anorm ) / ( n*ulp )
210 IF( anorm.LT.one )
THEN
211 result( 1 ) = ( min( wnorm, n*anorm ) / anorm ) / ( n*ulp )
213 result( 1 ) = min( wnorm / anorm, dble( n ) ) / ( n*ulp )
221 CALL dgemm(
'N',
'C', n, n, n, one, u, ldu, u, ldu, zero, work,
225 work( ( n+1 )*( j-1 )+1 ) = work( ( n+1 )*( j-1 )+1 ) - one
228 result( 2 ) = min( dble( n ), dlange(
'1', n, n, work, n,
229 $ work( n**2+1 ) ) ) / ( n*ulp )
subroutine dstt21(n, kband, ad, ae, sd, se, u, ldu, work, result)
DSTT21
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dsyr2(uplo, n, alpha, x, incx, y, incy, a, lda)
DSYR2
subroutine dsyr(uplo, n, alpha, x, incx, a, lda)
DSYR
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.