-
Notifications
You must be signed in to change notification settings - Fork 53
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
rework to save bracket #173
Conversation
Should I merge this? I certainly can, but wanted to make sure the interface is sufficient before doing so. |
Sorry @jverzani this one slipped my mind. We have developed a workaround for the time being which seems to be stable. What we did right now is instead of solving for If this PR makes sure that |
There are two possibilities due to the stopping rules employed: one with a bracket satisfying the condition or one where the algorithm terminates with an exact zero is found. In the latter case, the bracket may not satisfy the above. The return value includes a flag to determine which occurred. Is that a satisfactory design for you? |
I think that works for us. If we do |
No, that's the worry. For example, you might see this:
Here, the first step is to consider the midpoint |
I don't think that would be issue, isn't it @ChrisRackauckas ? This issue is not because of floating point error or inconsistent lower or upper limit but a property of the function. If Chris agrees too, this interface is good enough for us. |
The true problem is that |
Hi @ChrisRackauckas and @kanav99 . After your comments, I squeezed the tolerances for the Alefeld-Potra-Shi cases and the following is satisfied for the test cases: if
In the latter case, Hopefully that will suit for your use case. |
Yeah, having a known fact that it's at most 4 steps fixes this! Before we just put to run it like 5 steps otherwise through an error, so the larger tolerance likely was why ewe hit the error. |
@jverzani In case of
Note that xstar < bracket[1] < bracket[2]. Is this expected behaviour? |
Well, that isn't expected. Do you have the function available that I can look at? |
It is a private code someone sent me. I don't think I can send that to you. I will try to make a MWE |
Thanks. If you can, that would be great. If it proves too much work, let me
try to find the issue without an example.
…On Fri, Mar 13, 2020 at 12:14 PM Kanav Gupta ***@***.***> wrote:
It is a private code someone sent me. I don't think I can send that to
you. I will try to make a MWE
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#173 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADG6TGUKPHPON57UB3JHTLRHJLURANCNFSM4KR4RA2Q>
.
--
John Verzani
Department of Mathematics
College of Staten Island, CUNY
verzani@math.csi.cuny.edu
|
I think I found the culprit here. I made a PR #174. If you can check, it
would be most appreciated.
…On Fri, Mar 13, 2020 at 12:21 PM John Verzani ***@***.***> wrote:
Thanks. If you can, that would be great. If it proves too much work, let
me try to find the issue without an example.
On Fri, Mar 13, 2020 at 12:14 PM Kanav Gupta ***@***.***>
wrote:
> It is a private code someone sent me. I don't think I can send that to
> you. I will try to make a MWE
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#173 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AADG6TGUKPHPON57UB3JHTLRHJLURANCNFSM4KR4RA2Q>
> .
>
--
John Verzani
Department of Mathematics
College of Staten Island, CUNY
***@***.***
--
John Verzani
Department of Mathematics
College of Staten Island, CUNY
verzani@math.csi.cuny.edu
|
Introduces
find_bracket
to return a tuple containing a zero, an enclosing bracket, and a flat indicating if the value is an exact zero.To do so, required adding a field in the struct to store the approximate zero instead of reusing
xn1
, which contains one part of the bracket.