145 SUBROUTINE ssbt21( UPLO, N, KA, KS, A, LDA, D, E, U, LDU, WORK,
154 INTEGER KA, KS, LDA, LDU, N
157 REAL A( LDA, * ), D( * ), E( * ), RESULT( 2 ),
158 $ u( ldu, * ), work( * )
165 parameter( zero = 0.0e0, one = 1.0e0 )
170 INTEGER IKA, J, JC, JR, LW
171 REAL ANORM, ULP, UNFL, WNORM
175 REAL SLAMCH, SLANGE, SLANSB, SLANSP
176 EXTERNAL lsame, slamch, slange, slansb, slansp
182 INTRINSIC max, min, real
193 ika = max( 0, min( n-1, ka ) )
194 lw = ( n*( n+1 ) ) / 2
196 IF( lsame( uplo,
'U' ) )
THEN
204 unfl = slamch(
'Safe minimum' )
205 ulp = slamch(
'Epsilon' )*slamch(
'Base' )
213 anorm = max( slansb(
'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 sspr( cuplo, n, -d( j ), u( 1, j ), 1, work )
246 IF( n.GT.1 .AND. ks.EQ.1 )
THEN
248 CALL sspr2( cuplo, n, -e( j ), u( 1, j ), 1, u( 1, j+1 ), 1,
252 wnorm = slansp(
'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, real( n ) ) / ( n*ulp )
268 CALL sgemm(
'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( slange(
'1', n, n, work, n, work( n**2+1 ) ),
276 $ real( n ) ) / ( n*ulp )
subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SGEMM
subroutine sspr2(uplo, n, alpha, x, incx, y, incy, ap)
SSPR2
subroutine sspr(uplo, n, alpha, x, incx, ap)
SSPR
subroutine ssbt21(uplo, n, ka, ks, a, lda, d, e, u, ldu, work, result)
SSBT21