tqlrat.f
SUBROUTINE TQLRAT (N, D, E2, IERR)
C***BEGIN PROLOGUE TQLRAT
C***PURPOSE Compute the eigenvalues of symmetric tridiagonal matrix
C using a rational variant of the QL method.
C***LIBRARY SLATEC (EISPACK)
C***CATEGORY D4A5, D4C2A
C***TYPE SINGLE PRECISION (TQLRAT-S)
C***KEYWORDS EIGENVALUES OF A SYMMETRIC TRIDIAGONAL MATRIX, EISPACK,
C QL METHOD
C***AUTHOR Smith, B. T., et al.
C***DESCRIPTION
C
C This subroutine is a translation of the ALGOL procedure TQLRAT.
C
C This subroutine finds the eigenvalues of a SYMMETRIC
C TRIDIAGONAL matrix by the rational QL method.
C
C On Input
C
C N is the order of the matrix. N is an INTEGER variable.
C
C D contains the diagonal elements of the symmetric tridiagonal
C matrix. D is a one-dimensional REAL array, dimensioned D(N).
C
C E2 contains the squares of the subdiagonal elements of the
C symmetric tridiagonal matrix in its last N-1 positions.
C E2(1) is arbitrary. E2 is a one-dimensional REAL array,
C dimensioned E2(N).
C
C On Output
C
C D contains the eigenvalues in ascending order. If an
C error exit is made, the eigenvalues are correct and
C ordered for indices 1, 2, ..., IERR-1, but may not be
C the smallest eigenvalues.
C
C E2 has been destroyed.
C
C IERR is an INTEGER flag set to
C Zero for normal return,
C J if the J-th eigenvalue has not been
C determined after 30 iterations.
C
C Calls PYTHAG(A,B) for sqrt(A**2 + B**2).
C
C Questions and comments should be directed to B. S. Garbow,
C APPLIED MATHEMATICS DIVISION, ARGONNE NATIONAL LABORATORY
C ------------------------------------------------------------------
C
C***REFERENCES B. T. Smith, J. M. Boyle, J. J. Dongarra, B. S. Garbow,
C Y. Ikebe, V. C. Klema and C. B. Moler, Matrix Eigen-
C system Routines - EISPACK Guide, Springer-Verlag,
C 1976.
C C. H. Reinsch, Eigenvalues of a real, symmetric, tri-
C diagonal matrix, Algorithm 464, Communications of the
C ACM 16, 11 (November 1973), pp. 689.
C***ROUTINES CALLED PYTHAG, R1MACH
C***REVISION HISTORY (YYMMDD)
C 760101 DATE WRITTEN
C 890831 Modified array declarations. (WRB)
C 890831 REVISION DATE from Version 3.2
C 891214 Prologue converted to Version 4.0 format. (BAB)
C 920501 Reformatted the REFERENCES section. (WRB)
C***END PROLOGUE TQLRAT