147 SUBROUTINE sgbt02( TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B,
148 $ LDB, RWORK, RESID )
156 INTEGER KL, KU, LDA, LDB, LDX, M, N, NRHS
160 REAL A( LDA, * ), B( LDB, * ), X( LDX, * ),
168 parameter( zero = 0.0e+0, one = 1.0e+0 )
171 INTEGER I1, I2, J, KD, N1
172 REAL ANORM, BNORM, EPS, TEMP, XNORM
175 LOGICAL LSAME, SISNAN
177 EXTERNAL lsame, sasum, sisnan, slamch
183 INTRINSIC abs, max, min
189 IF( m.LE.0 .OR. n.LE.0 .OR. nrhs.LE.0 )
THEN
196 eps = slamch(
'Epsilon' )
198 IF( lsame( trans,
'N' ) )
THEN
204 i1 = max( kd+1-j, 1 )
205 i2 = min( kd+m-j, kl+kd )
207 temp = sasum( i2-i1+1, a( i1, j ), 1 )
208 IF( anorm.LT.temp .OR. sisnan( temp ) ) anorm = temp
220 DO 14 i1 = max( 1, j-ku ), min( m, j+kl )
221 rwork( i1 ) = rwork( i1 ) + abs( a( kd+i1, j ) )
226 IF( anorm.LT.temp .OR. sisnan( temp ) ) anorm = temp
229 IF( anorm.LE.zero )
THEN
234 IF( lsame( trans,
'T' ) .OR. lsame( trans,
'C' ) )
THEN
243 CALL sgbmv( trans, m, n, kl, ku, -one, a, lda, x( 1, j ), 1,
244 $ one, b( 1, j ), 1 )
252 bnorm = sasum( n1, b( 1, j ), 1 )
253 xnorm = sasum( n1, x( 1, j ), 1 )
254 IF( xnorm.LE.zero )
THEN
257 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
subroutine sgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy)
SGBMV
subroutine sgbt02(trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
SGBT02