146 SUBROUTINE zgbt02( TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B,
147 $ LDB, RWORK, RESID )
155 INTEGER KL, KU, LDA, LDB, LDX, M, N, NRHS
156 DOUBLE PRECISION RESID
159 DOUBLE PRECISION RWORK( * )
160 COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
166 DOUBLE PRECISION ZERO, ONE
167 parameter( zero = 0.0d+0, one = 1.0d+0 )
169 parameter( cone = ( 1.0d+0, 0.0d+0 ) )
172 INTEGER I1, I2, J, KD, N1
173 DOUBLE PRECISION ANORM, BNORM, EPS, TEMP, XNORM
177 LOGICAL DISNAN, LSAME
178 DOUBLE PRECISION DLAMCH, DZASUM
179 EXTERNAL disnan, dlamch, dzasum, lsame
185 DOUBLE PRECISION CABS1
188 INTRINSIC abs, dble, dimag, max, min
191 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
197 IF( m.LE.0 .OR. n.LE.0 .OR. nrhs.LE.0 )
THEN
204 eps = dlamch(
'Epsilon' )
206 IF( lsame( trans,
'N' ) )
THEN
212 i1 = max( kd+1-j, 1 )
213 i2 = min( kd+m-j, kl+kd )
215 temp = dzasum( i2-i1+1, a( i1, j ), 1 )
216 IF( anorm.LT.temp .OR. disnan( temp ) ) anorm = temp
228 DO 14 i1 = max( 1, j-ku ), min( m, j+kl )
229 rwork( i1 ) = rwork( i1 ) + cabs1( a( kd+i1, j ) )
234 IF( anorm.LT.temp .OR. disnan( temp ) ) anorm = temp
237 IF( anorm.LE.zero )
THEN
242 IF( lsame( trans,
'T' ) .OR. lsame( trans,
'C' ) )
THEN
251 CALL zgbmv( trans, m, n, kl, ku, -cone, a, lda, x( 1, j ), 1,
252 $ cone, b( 1, j ), 1 )
260 bnorm = dzasum( n1, b( 1, j ), 1 )
261 xnorm = dzasum( n1, x( 1, j ), 1 )
262 IF( xnorm.LE.zero )
THEN
265 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
subroutine zgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy)
ZGBMV
subroutine zgbt02(trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
ZGBT02