Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_roots_rect fails to return roots obtained with numpy.roots from the same polynomial. #13

Open
petersbingham opened this issue Oct 16, 2017 · 1 comment

Comments

@petersbingham
Copy link
Contributor

petersbingham commented Oct 16, 2017

The issue can be demonstrated using the additional test cases added to the fork here:
https://github.com/petersbingham/potapov_interpolation/blob/Potapov_PolyRootTests/Potapov_Code/tests/tests_Roots.py

eg:

test_Poly_Roots(19, printRoots=True, printPolys=False, printParams=False, doubleOnWarning=False)
test_Poly_Roots(32, printRoots=True, printPolys=False, printParams=False, doubleOnWarning=False)

When running these examples some stats are printed and then a list of roots (in the left column) obtained using numpy.roots and then another list obtained using get_roots_rect. The numbers in the right column (beside the roots) are the results of plugging the root back into the function (so obviously expect to be close to zero).

With N=19 above the numpy root at -0.830414981861-0.869004835643j is not returned.
With N=32 several roots appear missing.

@petersbingham petersbingham changed the title get_roots_rect fails to returned polynomial roots obtained with numpy.roots get_roots_rect fails to returned polynomial roots obtained with numpy.roots. Oct 16, 2017
@petersbingham petersbingham changed the title get_roots_rect fails to returned polynomial roots obtained with numpy.roots. get_roots_rect fails to return polynomial roots obtained with numpy.roots. Oct 16, 2017
@petersbingham petersbingham changed the title get_roots_rect fails to return polynomial roots obtained with numpy.roots. get_roots_rect fails to return roots obtained with numpy.roots from the same polynomial. Oct 16, 2017
@petersbingham
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant