-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
mathmore: invalid roots for a quartic polynomial #6900
Comments
Hi, If I change the code in ROOT::Math::Polynomial::FindRoots to use the generic GSL function, gsl_poly_complex_solve, it Lorenzo |
hi Lorenzo, I stumbled on this when implementing my own GPL-free polynomial roots-finding algorithm from first principles. hth, |
Hi, |
Looking back at my emails, I found that the routine comes from the LHCb RICH code and it was proposed to GSL, but it was never merged there at the end. |
The problem seems to be in the calculation of disc at line 151 If I uncomment these following lines
it seems top provide the correct result in your example. |
I had found this polynomial to test the branch of my code where (I am explicitly not looking at GPL-licensed code not to "taint" my BSD-licensed code) |
…d add test Uncomment some different code that is used to compute the discriminat of the resolvent cubic equation used to find roots of quartic. This code seems to eprforms better. This fixes root-project#6900 Add tests for quartic equations
…6908) * Fix in complex_quartic problem reported in issue #6900 and add test Uncomment some different code that is used to compute the discriminat of the resolvent cubic equation used to find roots of quartic. This code seems to eprforms better. This fixes #6900 Add tests for quartic equations * Update and fix links and spelling in the reference documentation of ROOT::Math::Polynomial * Increate test tolerance for fixing failure observed in i386
…d add test (root-project#6908) * Fix in complex_quartic problem reported in issue root-project#6900 and add test Uncomment some different code that is used to compute the discriminat of the resolvent cubic equation used to find roots of quartic. This code seems to eprforms better. This fixes root-project#6900 Add tests for quartic equations * Update and fix links and spelling in the reference documentation of ROOT::Math::Polynomial * Increate test tolerance for fixing failure observed in i386
…d add test (root-project#6908) * Fix in complex_quartic problem reported in issue root-project#6900 and add test Uncomment some different code that is used to compute the discriminat of the resolvent cubic equation used to find roots of quartic. This code seems to eprforms better. This fixes root-project#6900 Add tests for quartic equations * Update and fix links and spelling in the reference documentation of ROOT::Math::Polynomial * Increate test tolerance for fixing failure observed in i386
trying to find the roots of the following polynomial:
I get the following roots:
plotting that polynomial, we can easily notice the roots are incorrect:
using
numpy.roots
(which is using a companion matrix):we do get saner values.
The text was updated successfully, but these errors were encountered: