Skip to content

Commit

Permalink
Fix for #48911
Browse files Browse the repository at this point in the history
1. Fix output permutation when A.P is not the identity matrix.
2. Fix the application of the elementary transformation (correct complex conjugation) to the solution as per LAPACK zlarzb https://netlib.org/lapack/explore-html/d5/ddd/zlarzb_8f_source.html
  • Loading branch information
aravindh-krishnamoorthy authored Apr 25, 2023
1 parent bc5dd53 commit 96ec69a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions stdlib/LinearAlgebra/src/qr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -601,20 +601,20 @@ function _wide_qr_ldiv!(A::QR{T}, B::AbstractMatrix{T}) where T
B[m + 1:mB,1:nB] .= zero(T)
for j = 1:nB
for k = 1:m
vBj = B[k,j]
vBj = B[k,j]'
for i = m + 1:n
vBj += B[i,j]*R[k,i]'
vBj += B[i,j]'*R[k,i]
end
vBj *= τ[k]
B[k,j] -= vBj
B[k,j] -= vBj'
for i = m + 1:n
B[i,j] -= R[k,i]*vBj
B[i,j] -= R[k,i]'*vBj'
end
end
end
end
end
return B
return transpose(A.P)*B
end


Expand Down

0 comments on commit 96ec69a

Please sign in to comment.