122 SUBROUTINE cgtt02( TRANS, N, NRHS, DL, D, DU, X, LDX, B, LDB,
131 INTEGER LDB, LDX, N, NRHS
135 COMPLEX B( LDB, * ), D( * ), DL( * ), DU( * ),
143 parameter( one = 1.0e+0, zero = 0.0e+0 )
147 REAL ANORM, BNORM, EPS, XNORM
151 REAL CLANGT, SCASUM, SLAMCH
152 EXTERNAL lsame, clangt, scasum, slamch
165 IF( n.LE.0 .OR. nrhs.EQ.0 )
171 IF( lsame( trans,
'N' ) )
THEN
172 anorm = clangt(
'1', n, dl, d, du )
174 anorm = clangt(
'I', n, dl, d, du )
179 eps = slamch(
'Epsilon' )
180 IF( anorm.LE.zero )
THEN
187 CALL clagtm( trans, n, nrhs, -one, dl, d, du, x, ldx, one, b,
191 bnorm = scasum( n, b( 1, j ), 1 )
192 xnorm = scasum( n, x( 1, j ), 1 )
193 IF( xnorm.LE.zero )
THEN
196 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
subroutine cgtt02(trans, n, nrhs, dl, d, du, x, ldx, b, ldb, resid)
CGTT02
subroutine clagtm(trans, n, nrhs, alpha, dl, d, du, x, ldx, beta, b, ldb)
CLAGTM performs a matrix-matrix product of the form C = αAB+βC, where A is a tridiagonal matrix,...