-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3x3 matrix takes too many QR iterations #132
Comments
I can bring it down to 19 iterations by doing a single shift Wilkinson shift. LAPACK seems to also always do a double shift in case of real arithmetic? I've never fully understood it. In ArnoldiMethod.jl my implementation was to do double shift if complex conjugate, and single shift with eigenvalues closest to bottom right corner matrix value if real. That seems to work alright -- maybe by accident. |
Are you using the latest version? If you look at line 139 in EigenGeneral.jl then you can see I've introduced an exceptional shift for every tenth iteration. I thought it would be sufficient to avoid cycles but maybe it's not sufficient. |
Tried commit 8255d4e Now getting 577 iterations. I believe I haven't changed a thing, maybe I didn't properly But 577 is still a lot for a 3x3 matrix :p. IIUC there are two differences compared to reference LAPACK that may contribute to this:
However, I still have to check if LAPACK struggles with this matrix too or not. |
@haampie did you reach a conclusion here? |
This 3x3 matrix with (nearly) repeated eigenvalues takes an astonishing 2700 iterations of the QR algorithm:
Haven't checked yet how LAPACK handles it.
The text was updated successfully, but these errors were encountered: