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

Roots.Chandrapatla() returns non-sential results when the interval is not bracketing #441

Closed
ArturDoshchyn opened this issue Sep 1, 2024 · 2 comments

Comments

@ArturDoshchyn
Copy link

In my experience, using find_zero() with with bracketing methods always returns an error if the supplied interval is not in fact bracketing. Today, however, I discovered that Roots.Chandrapatla() does not do that, and instead silently fails and returns a non-sential result. I believe it would be good to make its behavior consistent with that of the other methods in order to avoid silent errors.

For example, if we define a function that does not have a root
f(x) = 1 + x^2
and apply Roots.Chandrapatla() to it on some interval
find_zero(f, (10.0, 20.0), Roots.Chandrapatla())
we get a non-sential result 2.149362113533461.

Apologies if I missed something in the discussion/documentation, and this behaviour is in fact intentional.

@jverzani
Copy link
Member

jverzani commented Sep 4, 2024

Thank you!! I really appreciate this report and will address it soon.

@jverzani
Copy link
Member

jverzani commented Dec 1, 2024

closed in #442; error thrown

@jverzani jverzani closed this as completed Dec 1, 2024
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

2 participants