Skip to content

Use pivoting as the default in LU regardless of the element type. #32989

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

Merged
merged 1 commit into from
Aug 23, 2019

Conversation

andreasnoack
Copy link
Member

For types that weren't subtypes of AbstractFloat, we used to try
to LU factorize without pivoting and only use pivoting when it failed.
This caused large numerical errors when computing the LU for element
types which promoted to float like numbers such as most integers.
The behavior was never documented and is error prone. Hence, this
PR removes the behavior.

Fixes JuliaLang/LinearAlgebra.jl#605. Alternative to #30953

For types that weren't subtypes of AbstractFloat, we used to try
to LU factorize without pivoting and only use pivoting when it failed.
This caused large numerical errors when computing the LU for element
types which promoted to float like numbers such as most integers.
The behavior was never documented and is error prone. Hence, this
PR removes the behavior.
@andreasnoack
Copy link
Member Author

I think it would be good if we could try backporting this to 1.3 since many people have complained about JuliaLang/LinearAlgebra.jl#605. If PkgEval shows that it breaks too many packages (I don't expect that) then we can drop it.

fredrikekre added a commit that referenced this pull request Aug 23, 2019
fredrikekre added a commit that referenced this pull request Aug 24, 2019
KristofferC pushed a commit that referenced this pull request Aug 25, 2019
…2989)

For types that weren't subtypes of AbstractFloat, we used to try
to LU factorize without pivoting and only use pivoting when it failed.
This caused large numerical errors when computing the LU for element
types which promoted to float like numbers such as most integers.
The behavior was never documented and is error prone. Hence, this
PR removes the behavior.

(cherry picked from commit 5af3c2a)
KristofferC pushed a commit that referenced this pull request Aug 25, 2019
@KristofferC KristofferC mentioned this pull request Aug 25, 2019
36 tasks
@KristofferC
Copy link
Member

Note that this was merged even with a (correctly) red CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear algebra Linear algebra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LU instability for non-float matrices due to lack of pivoting
3 participants