Skip to content

add exceptional shift#1603

Open
Toucan4Life wants to merge 1 commit into
dimforge:mainfrom
Toucan4Life:fix-611
Open

add exceptional shift#1603
Toucan4Life wants to merge 1 commit into
dimforge:mainfrom
Toucan4Life:fix-611

Conversation

@Toucan4Life
Copy link
Copy Markdown
Contributor

Summary of Changes

This PR fixes some cases where the search for eigenvalue could hang. This was solved by using the "Exceptional Shift" method in Wilkinson, J. H., & Reinsch, C. (1971).
Handbook for automatic computation (Vol. 2: Linear algebra).

Details

I first checked why the Lapack algorithm would converge and not hang. I looked at dlahqr procedure (https://netlib.org/lapack/explore-html/d8/df4/group__lahqr_ga100049ab080cef756846702a33e8e28f.html) saw the mention of the exceptional shift and the Ahues & Tisseur stopping criterion.

The last one was a red herring, I implemented it but the test matrix from #611 would still hang. I then implemented the exceptional shift and it worked. I tried tracing back the magical value (0.75 & -0.4375), and discovered https://www.netlib.org/eispack/hqr.f that led me to the original source:

Wilkinson, J. H., & Reinsch, C. (1971).
Handbook for automatic computation (Vol. 2: Linear algebra).

You can view the orignal magical number and algorithm implementation here : https://www.scribd.com/document/568239788/Wilkinson-Reinsch1971-Book-HandbookForAutomaticComputatio#page=373

AI was used to find the original paper

Testing

I implemented a test with the matrix from #611 that now pass successfully

Fixes #611

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

possible bug, hanging on getting eigenvalues?

1 participant