I am trying to solve a system of linear equations:
A * x = B
where A
and B
are real symmetric positive definite matrices with type BigFloat
.
I am trying to do the following:
using GenericLinearAlgebra
using LinearSolve
n = 100
A = big.(randn(n, n));
A = A * A';
B = big.(randn(n, n));
B = B * B';
c = big.(randn(n));
prob = LinearProblem(A, B);
solve(prob)
which yields the error
MethodError: no method matching ldiv!(::Vector{BigFloat}, ::LinearAlgebra.LU{BigFloat, Matrix{BigFloat}, Vector{Int64}}, ::Matrix{BigFloat})
If I use a vector instead of a matrix, i.e.
prob = LinearProblem(A, c);
solve(prob)
then it produces a result.
What is the workaround here to make it work for matrices? I can see in the GenericLinearAlgebra.jl
package there are functions for matrix equations, but I am not sure how to access gthem.