I'm writing a python module for mathematics, and I've tried to create a basic implementation of Laguerre's Method, without using external libraries such as numpy or scipy.
Laguerre's method is an algorithm for finding roots of polynomials ( i.e : intersection with the x axis ) , and it's further elaborated in Wikipedia:
The algorithm is detailed in Wikipedia.
Keep in mind this is not the finished implementation, and that I know I've probably made a stupid error, so expect stupidity from my side.
CodePudding user response:
This line:
d = max(abs(G root), abs(G - root))
Should be:
d = max([G root, G - root], key=abs)