123 SUBROUTINE sgtt02( TRANS, N, NRHS, DL, D, DU, X, LDX, B, LDB,
132 INTEGER LDB, LDX, N, NRHS
136 REAL B( LDB, * ), D( * ), DL( * ), DU( * ),
144 parameter( one = 1.0e+0, zero = 0.0e+0 )
148 REAL ANORM, BNORM, EPS, XNORM
152 REAL SASUM, SLAMCH, SLANGT
153 EXTERNAL lsame, sasum, slamch, slangt
166 IF( n.LE.0 .OR. nrhs.EQ.0 )
172 IF( lsame( trans,
'N' ) )
THEN
173 anorm = slangt(
'1', n, dl, d, du )
175 anorm = slangt(
'I', n, dl, d, du )
180 eps = slamch(
'Epsilon' )
181 IF( anorm.LE.zero )
THEN
188 CALL slagtm( trans, n, nrhs, -one, dl, d, du, x, ldx, one, b,
192 bnorm = sasum( n, b( 1, j ), 1 )
193 xnorm = sasum( n, x( 1, j ), 1 )
194 IF( xnorm.LE.zero )
THEN
197 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
subroutine slagtm(trans, n, nrhs, alpha, dl, d, du, x, ldx, beta, b, ldb)
SLAGTM performs a matrix-matrix product of the form C = αAB+βC, where A is a tridiagonal matrix,...
subroutine sgtt02(trans, n, nrhs, dl, d, du, x, ldx, b, ldb, resid)
SGTT02