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

wrong roots #5

Open
cridemichel opened this issue Jan 5, 2024 · 0 comments
Open

wrong roots #5

cridemichel opened this issue Jan 5, 2024 · 0 comments

Comments

@cridemichel
Copy link

cridemichel commented Jan 5, 2024

Hi,
this implementation is based on Shmakov method [1] which is known to be numerically unstable
(see [2] and [3]).
For example, consider the polynomial:

16.048 - 32.072 x + 24.036 x^2 - 8.006 x^3 + x^4

whose roots are 2.003, 2.002, 2.001 and 2, from your code you obtain the following
bad estimates of quartic roots:
``
❯ ./quartic 1 -8.006 24.036 -32.072 16.048

2.006000 + 0.000000i
2.000071 + 0.000126i
2.000071 + -0.000126i
1.999857 + -0.000000i
``
for a thorough discussion and other tests see Ref. [2],

best C.

[1] S. L. Shmakov, A universal method of solving quartic equations. Int. J. Pure Appl. Math. 71, 2 251–259 (2011)
[2] A.Orellana and C. De Michele ACM Transactions on Mathematical Software, Vol. 46, No. 2, 20 (2020), https://doi.org/10.1145/3386241
[3] C. De Michele, ACM Transactions on Mathematical Software, Vol. 48, No. 46, pp 1-3 (2022), https://doi.org/10.1145/3564270
@cridemichel

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