flintlib / flint

FLINT (Fast Library for Number Theory)
http://www.flintlib.org
GNU Lesser General Public License v3.0
401 stars 235 forks source link

Generic polynomial root refinement; improve acb_poly_find_roots using nfloat #2014

Closed fredrik-johansson closed 3 weeks ago

fredrik-johansson commented 3 weeks ago

Consider the example build/examples/poly_roots a 400 b 50 t 30 c 123 from the previous PR which took 4.1 seconds. Here this takes 3.9 seconds using only acf arithmetic and 1.8 seconds with the nfloat arithmetic enabled.

Note: this will surely need more testing, as there are various things that can go wrong.

Note: based on the limited testing I've done, the Aberth iteration is slightly slower than WDK, so we stick with WDK for now; the faster convergence seems to be offset by the cost of doing roughly twice as many arithmetic operations.