-
Notifications
You must be signed in to change notification settings - Fork 25
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
Struggles with "simple" complex polynomials #122
Comments
Currently, provided that the derivative is explicitly prescribed, the code no longer hangs. However, it gives many trivial roots except for one which is claimed to be unique... but unfortunately even this root seems not correct 😨. |
Are you sure you got the derivative right ? I made a mistake and got trivial interval like you, but then corrected it and got it to hang ( julia> f(x) = 24.109999999999996 - 70.33*x + 65.33*x^2 - 15.11*x^3 - 5.0*x^4 + 1.0*x^5
f (generic function with 1 method)
julia> df(x) = -70.33 + 2*65.33*x - 3*15.11*x^2 - 4*5.0*x^3 + 5.0*x^4
df (generic function with 1 method)
julia> rts = roots(f, Complex(interval(-10, 10), interval(-10, 10)) ; contractor = Krawczyk, derivative = df, max_iteration = 10000)
1852-element Vector{Root{Complex{Interval{Float64}}}}:
Root([6.01098, 6.01099]_com_NG + im*[-7.90672e-12, 7.90672e-12]_com_NG, :unique)
Root([-4.01975, -4.01852]_com + im*[-0.00132114, 0.000989419]_com, :unknown)
Root([-4.01853, -4.01728]_com + im*[-0.00132114, 0.000989419]_com, :unknown)
Root([-4.01729, -4.01604]_com + im*[-0.00132114, 0.000989419]_com, :unknown)
Root([-4.01605, -4.01478]_com + im*[-0.00132114, 0.000989419]_com, :unknown)
Root([-4.01479, -4.01356]_com + im*[-0.00132114, 0.000989419]_com, :unknown)
Root([-4.01357, -4.01232]_com + im*[-0.00132114, 0.000989419]_com, :unknown)
Root([-4.01233, -4.01108]_com + im*[-0.00132114, 0.000989419]_com, :unknown)
Root([-4.01109, -4.00982]_com + im*[-0.00132114, 0.000989419]_com, :unknown)
Root([-4.00983, -4.00858]_com + im*[-0.00132114, 0.000989419]_com, :unknown)
Root([-4.00859, -4.00732]_com + im*[-0.00132114, 0.000989419]_com, :unknown)
⋮ This is quite wrong regardless. |
Oh maybe I had made a mistake. But still, there should be a safeguard, so that even if I give a wrong derivative, it should not claim that there is a root in an interval when evaluating |
apparently hangs
The text was updated successfully, but these errors were encountered: