Previous: tql2 Up: ../eispad.html Next: trbak1


TQLRAT(N,D,E2,IERR)

       SUBROUTINE TQLRAT(N,D,E2,IERR)
 C
       INTEGER I,J,L,M,N,II,L1,MML,IERR
       DOUBLE PRECISION D(N),E2(N)
       DOUBLE PRECISION B,C,F,G,H,P,R,S,T,EPSLON,PYTHAG
 C
 C     THIS SUBROUTINE IS A TRANSLATION OF THE ALGOL PROCEDURE TQLRAT,
 C     ALGORITHM 464, COMM. ACM 16, 689(1973) BY REINSCH.
 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.
 C
 C        D CONTAINS THE DIAGONAL ELEMENTS OF THE INPUT MATRIX.
 C
 C        E2 CONTAINS THE SQUARES OF THE SUBDIAGONAL ELEMENTS OF THE
 C          INPUT MATRIX IN ITS LAST N-1 POSITIONS.  E2(1) IS ARBITRARY.
 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 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 FOR  DSQRT(A*A + B*B) .
 C
 C     QUESTIONS AND COMMENTS SHOULD BE DIRECTED TO BURTON S. GARBOW,
 C     MATHEMATICS AND COMPUTER SCIENCE DIV, ARGONNE NATIONAL LABORATORY
 C
 C     THIS VERSION DATED AUGUST 1983.
 C
 C     ------------------------------------------------------------------
 C