# Eigenvalue decomposition - help needed.

```
I have used the eigenvalue decomposition methods of Jama a lot and found
them to be quite good.
However on a 64*64 matrix (which I know can be diagonalized and have
real eigenvalues) I experience
som strange things in the decomposition. I have traced the problem to
the private method hqr2() (in Eigenvaluedecompostion.java).
The problem arose because the method sometimes never terminated. So I
counted the number of iterations spent in the
while (n>=low) loop. Shouldn't this always be the same for the same
matrix?? I have experienced loop counts
of 286,558,830, and 1373 respectively and sometimes it never terminates.
Could somebody please try the same
thing and tell me if it's just me or what's going on here?

-Martin Knudsen.

Test code included in file test.java.

```
```package Jama.test;
import Jama.*;

public class test
{

public static void main(String[] argv)
{
double [][] M6 = new double[64][64];

M6[14][14] = -0.072010394629092;
M6[14][46] = 0.060954599171667;
M6[14][62] = 0.011055795457425;
M6[46][14] =  0.611060391696089;
M6[46][46] =-0.622116187153514;
M6[46][62] = 0.011055795457425;
M6[62][14] =  0.509830110522404;
M6[62][46] =0.050856659104156;
M6[62][62] =-0.560686769626560;

Matrix A = new Matrix(M6);
EigenvalueDecomposition Eig = A.eig();
}

}
```

Date Index | Thread Index | Problems or questions? Contact list-master@nist.gov