
 
 Purpose
 =======
 
    LA_PTSVX computes the solution to a linear system of equations 
 A*X = B, where A has tridiagonal form and is real symmetric or complex
 Hermitian and, in either case, positive definite, and where X and B are
 rectangular matrices or vectors.
    LA_PTSVX can also optionally estimate the condition number of A and
 compute error bounds.
 
 =========
 
     SUBROUTINE LA_PTSVX( D, E, B, X, DF=df, EF=ef, FACT=fact, &
                  FERR=ferr, BERR=berr, RCOND=rcond, INFO=info )
          REAL(<wp>), INTENT(IN) :: D(:)
          <type>(<wp>), INTENT(IN) :: E(:), <rhs>
          <type>(<wp>), INTENT(OUT) :: <sol>
          REAL(<wp>), INTENT(INOUT), OPTIONAL :: DF(:)
          <type>(<wp>), INTENT(INOUT), OPTIONAL :: EF(:)
          CHARACTER(LEN=1), INTENT(IN), OPTIONAL :: FACT
          REAL(<wp>), INTENT(OUT), OPTIONAL :: <err>, RCOND
          INTEGER, INTENT(OUT), OPTIONAL :: INFO
     where
          <type> ::= REAL | COMPLEX
          <wp>   ::= KIND(1.0) | KIND(1.0D0)
          <rhs>  ::= B(:,:) | B(:)
          <sol>  ::= X(:,:) | X(:)
          <err>  ::= FERR(:), BERR(:) | FERR, BERR
 
 Arguments
 =========
 
 D       (input) REAL array, shape (:) with size(D) = n, where n is the 
         order of A.
         The diagonal of A.
 E       (input) REAL or COMPLEX array, shape (:) with size(E) = n-1.
         The subdiagonal of A.
 B       (input) REAL or COMPLEX array, shape (:,:) with size(B,1) = n 
         or shape (:) with size(B) = n.
         The matrix B.
 X       (output) REAL or COMPLEX array, shape (:,:) with size(X,1) = n
         and size(X,2) = size(B,2), or shape (:) with size(X) = n.
         The solution matrix X .
 DF      Optional (input or output) REAL array, shape (:) with the same 
         size as D.
         If FACT = 'F', then DF is an input argument that contains the 
         diagonal of D from the L*D*L^H factorization of A.
         If FACT = 'N', then DF is an output argument that contains the
         diagonal of D from the L*D*L^H factorization of A.
 EF      Optional (input or output) REAL or COMPLEX array, shape (:) with
         the same size as E.
         If FACT = 'F', then EF is an input argument that contains the 
         subdiagonal of L from the L*D*L^H factorization of A.
         If FACT = 'N', then EF is an output argument that contains the 
         subdiagonal of L from the L*D*L^H factorization of A.
 FACT    Optional (input) CHARACTER(LEN=1).
         Specifies whether the factored form of A has been supplied on
 	 entry.
           = 'N': The matrix A will be copied to DF and EF and factored.
           = 'F': DF and EF contain the factored form of A.
         Default value: 'N'.
 FERR    Optional (output) REAL array of shape (:), with 
         size(FERR) = size(X,2), or REAL scalar.
         The estimated 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    Optional (output) REAL array of shape (:), with size(BERR) = 
         size(X,2), or REAL scalar.
         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).
 RCOND   Optional (output) REAL.
         The estimate of the reciprocal condition number of the matrix 
         A. If RCOND is less than the machine precision, the matrix is 
         singular to working precision. This condition is indicated by
         a return code of INFO > 0.
 INFO    Optional (output) INTEGER
         = 0: successful exit.
         < 0: if INFO = -i, the i-th argument had an illegal value.
         > 0: if INFO = i, and i is
             <= n: the leading minor of order i of A is not positive 
 	         definite, so the factorization could not be completed
 		 unless i = n, and the solution and error bounds could 
 		 not be computed. RCOND = 0 is returned.
             = n+1: L is nonsingular, but RCOND is less than machine 
 	         precision, so the matrix is singular to working 
 		 precision. Nevertheless, the solution and error
                  bounds are computed because the computed solution can
                  be more accurate than the value of RCOND would suggest.
         If INFO is not present and an error occurs, then the program is
         terminated with an error message.

