-
Notifications
You must be signed in to change notification settings - Fork 71
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
What to do with mod? #129
Comments
Speaking about A complementary possibility is to have
Perhaps, this is what you mean by using contractors. |
In #145 I have implemented something that is equivalent to We could also implement some |
Great, thanks.
Why would there be three intervals?
Is this version of mod (which just returns 0..1) useful? I tried it with
root finding and it didn't seem to be too useful.
…On Thu, 3 May 2018, 3:01 pm Luis Benet, ***@***.***> wrote:
In #145 <#145>
I have implemented something that is equivalent to mod(0.8..2.2, 1) -->
0..1.
We could also implement some extended_mod which would return a tuple of
intervals (two or three, this we should discuss) which somehow mimics
extended_div.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#129 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AALtTniH72rkhmw7slmA8eqx0WR-1EQJks5tu1QFgaJpZM4TXHeO>
.
|
Considering your example,
This may be useful for things like |
Just pushed another commit to #145 with |
The problem is that all of the root finding functions assume that a single
box in gives a single box out. Basically extended mod etc lead to interval
unions, which is not yet implemented.
…On Fri, 4 May 2018, 11:49 am Luis Benet, ***@***.***> wrote:
Just pushed another commit to #145
<#145> with
extended_mod implemented. Can you retest your example with root finding,
using now extended_mod? Maybe you could post it so I can play with it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#129 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AALtTnG9ekSMND3_12RR-cNS2dhdwRIDks5tvHihgaJpZM4TXHeO>
.
|
I'm not sure I understand your point. I agree that |
I just mean that the current versions of the algorithms can't deal with interval unions. |
Is there any update here, or at least instructions of how to handle mods? I have a simple dynamical system that involves the mod operation function dissipative_standard_map_rule(u, p, n)
x, y = u
(; ν, f₀) = p
s = x + y
xn = mod2pi(s)
yn = (1 - ν)*y + f₀*(sin(s))
return SVector(xn, yn)
end and I would like to find its fixed points using interval arithmetic (root finding) via utilizing Newton's method (I am using
Since I am anyways only searching for roots for x bounded in [0, 2pi], would you say it is correct to simply remove the |
I guess the work you are looking for is in #145, but somehow we got distracted with other stuff... |
Seems that #525 is much more recent and perhaps could be merged with relatively little effort? I would agree with the OP that the (interval, real) method is the most common. |
To me it looks like you could use I merged #525 for now. It will not remove the error directly, because it doesn't add What you want may rather be something like |
Thank you yes. In the meantime I indeed went ahead and removed the mod from my equations but unfortunately in the end of the day it didn't help me, turns out the Jacobian matrix isn't invertible so it was all for naught xD But thanks a lot for progressing with the mod! |
How should we deal with functions like
mod
acting on intervals?E.g.
mod(0.8..1.2, 1)
should give(0..0.2) ∪ (0.8..1)
;mod(0.8..2.2, 1)
should give0..1
?One solution is to define an interval union type; see e.g.
https://link.springer.com/article/10.1007/s10543-016-0632-y
Really the correct solution is probably to use contractors.
The text was updated successfully, but these errors were encountered: