Home > Blockchain >  Implementing Laugerre's method in python
Implementing Laugerre's method in python

Time:10-04

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: Fails miserably for -7

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)
  • Related