ApproxFun.jl icon indicating copy to clipboard operation
ApproxFun.jl copied to clipboard

complexroots fails with BigFloats

Open dpsanders opened this issue 4 years ago • 2 comments

julia> x = Fun(identity, big(-100)..100)
Fun(Chebyshev(-100..100),BigFloat[0.0, 100.0])

julia> complexroots(x^2 + 2x)
ERROR: MethodError: no method matching eigvals!(::Array{BigFloat,2})

I think there are routines in https://github.com/JuliaLinearAlgebra/GenericLinearAlgebra.jl that can handle this?

dpsanders avatar Apr 20 '20 16:04 dpsanders

They require symmetric, I think.

dlfivefifty avatar Apr 20 '20 17:04 dlfivefifty

No, actually it works for any matrix:

julia> using GenericLinearAlgebra

julia> M = big.([1 2; 3 4])
2×2 Array{BigInt,2}:
 1  2
 3  4

julia> GenericLinearAlgebra.eigvals(M)
2-element Array{Complex{BigFloat},1}:
 -0.3722813232690143299253057341094646591101322289913961838499387352829503607286868 - 0.0im
   5.372281323269014329925305734109464659110132228991396183849938735282950360728687 + 0.0im

dpsanders avatar Apr 20 '20 17:04 dpsanders