-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Use a stable inverse for Tridiagonal and SymTridiagonal #29667
Conversation
Looks like this revealed an issue with |
Issue solved. The |
n = size(S,1) | ||
d = S.dv | ||
e = S.ev | ||
@inbounds @simd for i = 1:n-1 | ||
e[i] /= d[i] | ||
d[i+1] -= abs2(e[i])*d[i] | ||
d[i+1] -= e[i]^2*d[i] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was abs2
incorrect here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but the previous version was also restricted to Real
so it didn't matter. Had the type been HermitianTridiagonal then abs2
would have been correct.
* Use a stable inverse for Tridiagonal and SymTridiagonal Fixes #29630 * Fix ldlt in the complex case (cherry picked from commit 00bb4f2)
* Use a stable inverse for Tridiagonal and SymTridiagonal Fixes #29630 * Fix ldlt in the complex case (cherry picked from commit 00bb4f2)
* Use a stable inverse for Tridiagonal and SymTridiagonal Fixes #29630 * Fix ldlt in the complex case (cherry picked from commit 00bb4f2)
Fixes JuliaLang/LinearAlgebra.jl#572