jverzani / AMRVW.jl

Implementation in Julia of unitary core transformations approach to finding eigenvalues of companion matrices
MIT License
10 stars 0 forks source link

deflate_leading_zeros fixes #11

Closed nsajko closed 1 year ago

nsajko commented 1 year ago

Note that after this PR AMRVW behaves like so:

julia> A.roots([0.0])
ComplexF64[]

julia> A.roots(ComplexF64[])
ComplexF64[]

I don't know what's the intended behavior, but it might make sense to error explicitly in the case of a zero polynomial, instead of returning no roots.

jverzani commented 1 year ago

Thanks! An error is as reasonable as an empty collection. We use an empty collection in Polynomials. PolynomialRoots errors in the algorithm. Not sure any solution would be preferred. I'll merge this in once the tests pass.