228 SUBROUTINE sptsvx( FACT, N, NRHS, D, E, DF, EF, B, LDB, X, LDX,
229 $ rcond, ferr, berr, work, info )
238 INTEGER info, ldb, ldx, n, nrhs
242 REAL b( ldb, * ), berr( * ), d( * ), df( * ),
243 $ e( * ), ef( * ), ferr( * ), work( * ),
251 parameter( zero = 0.0e+0 )
274 nofact =
lsame( fact,
'N' )
275 IF( .NOT.nofact .AND. .NOT.
lsame( fact,
'F' ) )
THEN
277 ELSE IF( n.LT.0 )
THEN
279 ELSE IF( nrhs.LT.0 )
THEN
281 ELSE IF( ldb.LT.max( 1, n ) )
THEN
283 ELSE IF( ldx.LT.max( 1, n ) )
THEN
287 CALL
xerbla(
'SPTSVX', -info )
295 CALL
scopy( n, d, 1, df, 1 )
297 $ CALL
scopy( n-1, e, 1, ef, 1 )
298 CALL
spttrf( n, df, ef, info )
310 anorm =
slanst(
'1', n, d, e )
314 CALL
sptcon( n, df, ef, anorm, rcond, work, info )
318 CALL
slacpy(
'Full', n, nrhs,
b, ldb,
x, ldx )
319 CALL
spttrs( n, nrhs, df, ef,
x, ldx, info )
324 CALL
sptrfs( n, nrhs, d, e, df, ef,
b, ldb,
x, ldx, ferr, berr,
329 IF( rcond.LT.
slamch(
'Epsilon' ) )
LOGICAL function lsame(CA, CB)
LSAME
subroutine spttrs(N, NRHS, D, E, B, LDB, INFO)
SPTTRS
REAL function slamch(CMACH)
SLAMCH
REAL function slanst(NORM, N, D, E)
SLANST returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a real symmetric tridiagonal matrix.
subroutine sptrfs(N, NRHS, D, E, DF, EF, B, LDB, X, LDX, FERR, BERR, WORK, INFO)
SPTRFS
subroutine xerbla(SRNAME, INFO)
XERBLA
set ue cd $ADTTMP cat<< EOF > tmp f Program LinearEquations Implicit none Real b(3) integer i
subroutine scopy(N, SX, INCX, SY, INCY)
SCOPY
subroutine slacpy(UPLO, M, N, A, LDA, B, LDB)
SLACPY copies all or part of one two-dimensional array to another.
subroutine spttrf(N, D, E, INFO)
SPTTRF
subroutine sptcon(N, D, E, ANORM, RCOND, WORK, INFO)
SPTCON
subroutine sptsvx(FACT, N, NRHS, D, E, DF, EF, B, LDB, X, LDX, RCOND, FERR, BERR, WORK, INFO)
SPTSVX computes the solution to system of linear equations A * X = B for PT matrices ...