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

Fractional powers of nonpositive intervals containing zero #543

Closed
cbilz opened this issue Sep 26, 2022 · 2 comments · Fixed by #593
Closed

Fractional powers of nonpositive intervals containing zero #543

cbilz opened this issue Sep 26, 2022 · 2 comments · Fixed by #593

Comments

@cbilz
Copy link

cbilz commented Sep 26, 2022

^ returns the zero interval while pow returns the empty interval:

julia> using IntervalArithmetic

julia> a = interval(-1.0, 0.0)
[-1, 0]

julia> a^1.7
[0, 0]

julia> pow(a,1.7)
∅

julia> b = interval(0.0)
[0, 0]

julia> b^1.7
[0, 0]

julia> pow(b,1.7)
∅

This seems inconsistent. Does ITF1788 say what the correct result should be?

@cbilz
Copy link
Author

cbilz commented Sep 28, 2022

I believe the standard says that interval(0.0)^1.7 should return interval(0.0), as it does. (see Table 9.1 and Case a) in 7.3)

It does not stipulate what something like interval(-1.0, 0.0)^1.7, where the interval contains negative numbers, should return. One of the suggested possibilities is to return interval(0.0). This is consistent with what sqrt(interval(-1.0, 0.0)) does.

I would suggest that pow should also return interval(0.0) in these cases.

@cbilz cbilz closed this as completed Sep 28, 2022
@cbilz cbilz reopened this Sep 28, 2022
cbilz added a commit to cbilz/IntervalArithmetic.jl that referenced this issue Sep 28, 2022
@lucaferranti
Copy link
Member

sorry I forgot to answer, as you figured out the ^ is currently the standard conforming behavior. ITF1788 has a (similar) test for what you're doing here.

@OlivierHnt OlivierHnt mentioned this issue Dec 11, 2023
1 task
@OlivierHnt OlivierHnt linked a pull request Dec 11, 2023 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants