147 SUBROUTINE dgbt02( 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
157 DOUBLE PRECISION RESID
160 DOUBLE PRECISION A( LDA, * ), B( LDB, * ), X( LDX, * ),
167 DOUBLE PRECISION ZERO, ONE
168 parameter( zero = 0.0d+0, one = 1.0d+0 )
171 INTEGER I1, I2, J, KD, N1
172 DOUBLE PRECISION ANORM, BNORM, EPS, TEMP, XNORM
175 LOGICAL DISNAN, LSAME
176 DOUBLE PRECISION DASUM, DLAMCH
177 EXTERNAL dasum, disnan, dlamch, lsame
183 INTRINSIC abs, max, min
189 IF( m.LE.0 .OR. n.LE.0 .OR. nrhs.LE.0 )
THEN
196 eps = dlamch(
'Epsilon' )
198 IF( lsame( trans,
'N' ) )
THEN
204 i1 = max( kd+1-j, 1 )
205 i2 = min( kd+m-j, kl+kd )
207 temp = dasum( i2-i1+1, a( i1, j ), 1 )
208 IF( anorm.LT.temp .OR. disnan( 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. disnan( temp ) ) anorm = temp
229 IF( anorm.LE.zero )
THEN
234 IF( lsame( trans,
'T' ) .OR. lsame( trans,
'C' ) )
THEN
243 CALL dgbmv( trans, m, n, kl, ku, -one, a, lda, x( 1, j ), 1,
244 $ one, b( 1, j ), 1 )
252 bnorm = dasum( n1, b( 1, j ), 1 )
253 xnorm = dasum( n1, x( 1, j ), 1 )
254 IF( xnorm.LE.zero )
THEN
257 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
subroutine dgbt02(trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
DGBT02
subroutine dgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy)
DGBMV