Contents


NAME

     zptrfs - improve the computed solution to a system of linear
     equations  when the coefficient matrix is Hermitian positive
     definite and tridiagonal,  and  provides  error  bounds  and
     backward error estimates for the solution

SYNOPSIS

     SUBROUTINE ZPTRFS(UPLO, N, NRHS, D, E, DF, EF, B, LDB, X,
           LDX, FERR, BERR, WORK, WORK2, INFO)

     CHARACTER * 1 UPLO
     DOUBLE COMPLEX E(*), EF(*), B(LDB,*), X(LDX,*), WORK(*)
     INTEGER N, NRHS, LDB, LDX, INFO
     DOUBLE PRECISION D(*), DF(*), FERR(*), BERR(*), WORK2(*)

     SUBROUTINE ZPTRFS_64(UPLO, N, NRHS, D, E, DF, EF, B, LDB,
           X, LDX, FERR, BERR, WORK, WORK2, INFO)

     CHARACTER * 1 UPLO
     DOUBLE COMPLEX E(*), EF(*), B(LDB,*), X(LDX,*), WORK(*)
     INTEGER*8 N, NRHS, LDB, LDX, INFO
     DOUBLE PRECISION D(*), DF(*), FERR(*), BERR(*), WORK2(*)

  F95 INTERFACE
     SUBROUTINE PTRFS(UPLO, [N], [NRHS], D, E, DF, EF, B, [LDB],
            X, [LDX], FERR, BERR, [WORK], [WORK2], [INFO])

     CHARACTER(LEN=1) :: UPLO
     COMPLEX(8), DIMENSION(:) :: E, EF, WORK
     COMPLEX(8), DIMENSION(:,:) :: B, X
     INTEGER :: N, NRHS, LDB, LDX, INFO
     REAL(8), DIMENSION(:) :: D, DF, FERR, BERR, WORK2

     SUBROUTINE PTRFS_64(UPLO, [N], [NRHS], D, E, DF, EF, B,
            [LDB], X, [LDX], FERR, BERR, [WORK], [WORK2], [INFO])

     CHARACTER(LEN=1) :: UPLO
     COMPLEX(8), DIMENSION(:) :: E, EF, WORK
     COMPLEX(8), DIMENSION(:,:) :: B, X
     INTEGER(8) :: N, NRHS, LDB, LDX, INFO
     REAL(8), DIMENSION(:) :: D, DF, FERR, BERR, WORK2

  C INTERFACE
     #include <sunperf.h>

     void zptrfs(char uplo, int n, int  nrhs,  double  *d,  doub-
               lecomplex   *e,  double  *df,  doublecomplex  *ef,
               doublecomplex *b, int ldb, doublecomplex  *x,  int
               ldx, double *ferr, double *berr, int *info);

     void zptrfs_64(char uplo, long  n,  long  nrhs,  double  *d,
               doublecomplex  *e,  double *df, doublecomplex *ef,
               doublecomplex *b, long ldb, doublecomplex *x, long
               ldx, double *ferr, double *berr, long *info);

PURPOSE

     zptrfs improves the computed solution to a system of  linear
     equations  when the coefficient matrix is Hermitian positive
     definite and tridiagonal,  and  provides  error  bounds  and
     backward error estimates for the solution.

ARGUMENTS

     UPLO (input)
               Specifies whether the superdiagonal or the  subdi-
               agonal  of  the tridiagonal matrix A is stored and
               the form of the factorization:
               = 'U':  E is the  superdiagonal  of  A,  and  A  =
               U**H*D*U;
               = 'L':  E  is  the  subdiagonal  of  A,  and  A  =
               L*D*L**H.   (The  two forms are equivalent if A is
               real.)

     N (input) The order of the matrix A.  N >= 0.

     NRHS (input)
               The number of right hand sides, i.e.,  the  number
               of columns of the matrix B.  NRHS >= 0.

     D (input) The n real diagonal elements  of  the  tridiagonal
               matrix A.

     E (input) The (n-1) off-diagonal elements of the tridiagonal
               matrix A (see UPLO).

     DF (input)
               The n diagonal elements of the diagonal  matrix  D
               from the factorization computed by ZPTTRF.

     EF (input)
               The  (n-1)  off-diagonal  elements  of  the   unit
               bidiagonal  factor  U  or L from the factorization
               computed by ZPTTRF (see UPLO).

     B (input) The right hand side matrix B.

     LDB (input)
               The leading dimension of  the  array  B.   LDB  >=
               max(1,N).

     X (input/output)
               On entry, the solution matrix X,  as  computed  by
               ZPTTRS.  On exit, the improved solution matrix X.

     LDX (input)
               The leading dimension of  the  array  X.   LDX  >=
               max(1,N).

     FERR (output)
               The forward error bound for each  solution  vector
               X(j)  (the  j-th column of the solution matrix X).
               If XTRUE is the  true  solution  corresponding  to
               X(j),  FERR(j) is an estimated upper bound for the
               magnitude of the largest element in (X(j) - XTRUE)
               divided by the magnitude of the largest element in
               X(j).

     BERR (output)
               The componentwise relative backward error of  each
               solution  vector X(j) (i.e., the smallest relative
               change in any element of A or B that makes X(j) an
               exact solution).

     WORK (workspace)
               dimension(N)

     WORK2 (workspace)
               dimension(N)

     INFO (output)
               = 0:  successful exit
               < 0:  if INFO = -i, the i-th argument had an ille-
               gal value