Skip to content

Commit

Permalink
Tests for #48911: LinearAlgebra/test/qr.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
aravindh-krishnamoorthy committed May 2, 2023
1 parent b48c014 commit df37bdc
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions stdlib/LinearAlgebra/test/qr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -474,4 +474,24 @@ end
@test MyIdentity{Float64}()[1,:] == [1.0, 0.0]
end

@testset "issue #48911" begin
# test ldiv!(::QRPivoted, ::AbstractVector)
A = Complex{BigFloat}[1+im 2-2im 3+3im; 4-4im 5+5im 6-6im]
b = Complex{BigFloat}[1+im; 0]
x = A\b
AF = Complex{Float64}[1+im 2-2im 3+3im; 4-4im 5+5im 6-6im]
bf = Complex{Float64}[1+im; 0]
xf = AF\bf
@test x xf

# test ldiv!(::QRPivoted, ::AbstractMatrix)
C = Complex{BigFloat}[1+im 2-2im 3+3im; 4-4im 5+5im 6-6im]
D = Complex{BigFloat}[1+im 1-im; 0 0]
x = C\D
CF = Complex{Float64}[1+im 2-2im 3+3im; 4-4im 5+5im 6-6im]
DF = Complex{Float64}[1+im 1-im; 0 0]
xf = CF\DF
@test x xf
end

end # module TestQR

0 comments on commit df37bdc

Please sign in to comment.