JuliaMath / Polynomials.jl

Polynomial manipulations in Julia
http://juliamath.github.io/Polynomials.jl/
Other
303 stars 75 forks source link

Question about using #555

Closed lesobrod closed 8 months ago

lesobrod commented 9 months ago

Hello! I need to find roots of s.c. 0,1 - polynomials with high degrees many times. More exactly I need just number of real roots, see detailed here. Which package is the most suitable for it?

jverzani commented 9 months ago

So, Polynomial.roots will not be suitable for degrees above 50 or so, if even. The AMRVW package can do much better, but for your problem a specialized algorithm is likely the way to go. The RealPolynomialRoots package is intended to this, but doesn't scale to large polynomials well, as it doesn't have some more asymptotically efficient algorithms implemented (just naive ones). So... I'd suggest trying Nemo (https://nemocas.github.io/Nemo.jl/v0.13/polynomial.html#Root-finding-1) which uses the arb library under the hood and has the isolating algorithms you likely need.

lesobrod commented 9 months ago

Aha, thank you very much!