You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ldiv!(Y, A, B) -> Y
Compute A \ B in-place and store the result in Y, returning the result.
ldiv!(A, B)
Compute A \ B in-place and overwriting B to store the result.
But this does not seem to be honored when A is an SVD object.
julia> Asvd =svd(A);
julia> x =copy(b)
3-element Vector{Float64}:-1.023.015.0
julia>ldiv!(x, Asvd, b)
3-element Vector{Float64}:1.99999999999999963.00000000000000044.000000000000001
julia> x
3-element Vector{Float64}:-1.023.015.0
Note that ldiv! returned the correct solution, but this was not written into x, which it should according to the documentation. The same happens with the 2-argument version:
julia>ldiv!(Asvd, b)
3-element Vector{Float64}:1.99999999999999963.00000000000000044.000000000000001
julia> b
3-element Vector{Float64}:-1.023.015.0
When using LU factorization everything is as expected:
julia> Alu =lu(A);
julia>ldiv!(x, Alu, b)
3-element Vector{Float64}:2.03.04.0
julia> x
3-element Vector{Float64}:2.03.04.0
julia>ldiv!(Alu, b)
3-element Vector{Float64}:2.03.04.0
julia> b
3-element Vector{Float64}:2.03.04.0
julia>versioninfo()
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-2305:59 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU:Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
WORD_SIZE:64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
The text was updated successfully, but these errors were encountered:
The documentation for
ldiv!
statesBut this does not seem to be honored when
A
is anSVD
object.The solution
x
toA x = b
is given byWhen doing this via an
SVD
decomposition:Note that
ldiv!
returned the correct solution, but this was not written intox
, which it should according to the documentation. The same happens with the 2-argument version:When using
LU
factorization everything is as expected:The text was updated successfully, but these errors were encountered: