JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.69k stars 5.48k forks source link

ldiv! in-place solution for SVD is not the same as the one emitted by `ldiv!(y fact::SVD, b) --> y` in `1.6.4` #43404

Open vpuri3 opened 2 years ago

vpuri3 commented 2 years ago
julia> VERSION
v"1.6.4"

julia> using LinearAlgebra

julia> n=8; A=rand(n,n); u=rand(n); b=A*u; v=zero(u); F=svd(A); ldiv!(v,F,b) ≈ u, v ≈ u
(true, false)
julia> using LinearAlgebra

julia> VERSION
v"1.7.0"

julia> n=8; A=rand(n,n); u=rand(n); b=A*u; v=zero(u); F=svd(A); ldiv!(v,F,b) ≈ u, v ≈ u
(true, true)
N5N3 commented 2 years ago

See #40944, the related PRs, #40899 and #41083, were not backported to 1.6. Edit: Looks like we thought we have backported #41083 to 1.6.2, but I can't find the related modification in #40702's Files changed @KristofferC).