sqrt of a BigFloat matrix
Any chance of getting sqrt to work?
It seems like LinearAlgebra makes assumptions about what schur returns in this function. Example:
julia> using GenericLinearAlgebra
s
julia> A = rand(BigFloat, 2, 2);
julia> sqrt(A)
ERROR: type Schur has no field values
Stacktrace:
[1] getproperty(F::GenericLinearAlgebra.Schur{BigFloat, Matrix{BigFloat}}, s::Symbol)
@ GenericLinearAlgebra ~/.julia/packages/GenericLinearAlgebra/tfuHk/src/eigenGeneral.jl:72
[2] sqrt(A::Matrix{BigFloat})
@ LinearAlgebra /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/LinearAlgebra/src/dense.jl:865
[3] top-level scope
@ REPL[3]:1
(My use case is that taking the square root of a Gram matrix is a neat way to orthogonalize a basis for a function space.)
Being a bit more familiar with the code now, I wonder why GenericLinearAlgebra has its own Hessenberg and Schur types, even though LinearAlgebra has those too. Is there a reason they can't be reused, or could it be worthwhile to spend the effort to do so?
Update: I'm pretty sure the HessenbergMatrix type can just be replaced by LinearAlgebra.UpperHessenberg. That simple change passes all the tests. The former was written five years ago and the latter four years (says git blame), so I'm suspecting a chronological reason rather than a technical one. Reusing the corresponding factorization is less obvious - this is not my area of expertise.