Skip to content

Instantly share code, notes, and snippets.

@vlent
vlent / alberth_method.hs
Created February 21, 2019 13:27
Haskell implementation of Alberth method for finding all roots of a polynomial
-- Alberth method for finding all roots of a (complex) polynomial
-- https://en.wikipedia.org/wiki/Aberth_method
-- The calculations have to use complex numbers.
-- Some optimizations are possible if the coefficients are real,
-- This is not implemented here.
-- Implementation was prompted by
-- https://byorgey.wordpress.com/2019/02/13/finding-roots-of-polynomials-in-haskell/
-- This is not meant to be robust implementation, just a proof of concept.
-- For analysis and implementation of this specific method,
-- see the work by D Bini and others.