numpy polyroots implementation

85 Views Asked by At

I'm implementing a rootfinder in pytorch so I checked the implementation in numpy.

However I don't understand this:

# rotated companion matrix reduces error
m = polycompanion(c)[::-1,::-1]

Why would this reduce the error? Why would this give the same roots as the original companion matrix? This may be a mathematical question but I couldn't find an explanation.

0

There are 0 best solutions below