1      subroutine rebakb(nm,n,b,dl,m,z)
2c
3      integer i,j,k,m,n,i1,ii,nm
4      double precision b(nm,n),dl(n),z(nm,m)
5      double precision x
6c
7c     this subroutine is a translation of the algol procedure rebakb,
8c     num. math. 11, 99-110(1968) by martin and wilkinson.
9c     handbook for auto. comp., vol.ii-linear algebra, 303-314(1971).
10c
11c     this subroutine forms the eigenvectors of a generalized
12c     symmetric eigensystem by back transforming those of the
13c     derived symmetric matrix determined by  reduc2.
14c
15c     on input
16c
17c        nm must be set to the row dimension of two-dimensional
18c          array parameters as declared in the calling program
19c          dimension statement.
20c
21c        n is the order of the matrix system.
22c
23c        b contains information about the similarity transformation
24c          (cholesky decomposition) used in the reduction by  reduc2
25c          in its strict lower triangle.
26c
27c        dl contains further information about the transformation.
28c
29c        m is the number of eigenvectors to be back transformed.
30c
31c        z contains the eigenvectors to be back transformed
32c          in its first m columns.
33c
34c     on output
35c
36c        z contains the transformed eigenvectors
37c          in its first m columns.
38c
39c     questions and comments should be directed to burton s. garbow,
40c     mathematics and computer science div, argonne national laboratory
41c
42c     this version dated august 1983.
43c
44c     ------------------------------------------------------------------
45c
46      if (m .eq. 0) go to 200
47c
48      do 100 j = 1, m
49c     .......... for i=n step -1 until 1 do -- ..........
50         do 100 ii = 1, n
51            i1 = n - ii
52            i = i1 + 1
53            x = dl(i) * z(i,j)
54            if (i .eq. 1) go to 80
55c
56            do 60 k = 1, i1
57   60       x = x + b(i,k) * z(k,j)
58c
59   80       z(i,j) = x
60  100 continue
61c
62  200 return
63      end
64