-
Notifications
You must be signed in to change notification settings - Fork 70
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
When is an Interval infinite? [ definition of isinf() ] #168
Comments
Thanks for opening this issue (rather than moving this elsewhere in IntervalRootFinding). Just to state what I already proposed, in my opinion |
isinf in Julia means very specifically that the "value is infinite". I don't think there is a useful version of this for intervals, so the method should probably be removed. |
There are only two valid cases in my opinion:
In the first case I think it's clear that Therefore I think |
Since |
If it is not defined;
|
OK, let's throw an error. |
Tricky question: Do we always throw an error or only when the interval contains an infinity? |
I was wondering that. I have a feeling it will be more useful to always throw an error, so that you find out fast if an algorithm is or not suitable for using with intervals. |
On the other hand it might break algorithms which are working fine at the moment (as long as you don't throw infinities at them). |
Right, but that might break if an infinity gets in there in an inconvenient moment. Tricky one. |
I think as a user I would prefer an algorithm to work until it hits an actual problem. And then I could catch the error and deal with it in some way. |
Yes that's a good point. It seems weird to throw an error from the |
Now, as I think through this: Doesn't all of this apply to |
To me To illustrate, consider these definitions:
(Sidenote: |
I like the idea! It would be a good idea to catch cases that include |
On master branch we chose to be very conservative with boolean functions to prevent silent errors. Using |
The current definition of
isinf()
has raised questions here and here. We should settle these discussions here and find a meaningful (and useful) definition forisinf()
or remove the method if we cannot.For reference, the current definition:
The text was updated successfully, but these errors were encountered: