This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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. |