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

Interval(-oo, oo) contains oo #10326

Closed
kshitij10496 opened this Issue Dec 28, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@kshitij10496
Copy link
Member

kshitij10496 commented Dec 28, 2015

Related : #9706

In [ ]: foo = Interval(-oo, oo)

In [ ]: foo.contains(-oo)
Out[ ]: True

In [ ]: foo.contains(oo)
Out[ ]: True

Ping @asmeurer

@asmeurer

This comment has been minimized.

Copy link
Member

asmeurer commented Dec 28, 2015

To quote my comment from the other issue, I guess the issue is

    if self.start is S.NegativeInfinity and self.end is S.Infinity:
        if not other.is_real is None:
            return other.is_real

in Interval._contains. But the problem is that oo.is_real is True, which is a known issue with the old assumptions (I guess #8203 is the issue for it).

Arafatk added a commit to Arafatk/sympy that referenced this issue Dec 29, 2015

@Arafatk Arafatk referenced this issue Dec 29, 2015

Closed

Fixes #10326 #10329

@kshitij10496

This comment has been minimized.

Copy link
Member

kshitij10496 commented Dec 29, 2015

@asmeurer I think fixing this issue in _contains would overlook the actual bug (oo.is_real returns True).
If the new Assumptions fixes this (as it should), wouldn't it be better if we wait until then ?

shaoron added a commit to shaoron/sympy that referenced this issue Dec 31, 2015

fix sympy#10326 issue interval(-oo,oo) contains oo
Just add 2 lines to handle (-oo,oo) case

kshitij10496 added a commit to kshitij10496/sympy that referenced this issue Jan 1, 2016

shaoron added a commit to shaoron/sympy that referenced this issue Jan 2, 2016

fix sympy#10326 issue interval(-oo,oo) contains oo
Move infinities check to other_is_real

shaoron added a commit to shaoron/sympy that referenced this issue Jan 2, 2016

@kshitij10496

This comment has been minimized.

Copy link
Member

kshitij10496 commented Jan 4, 2016

@asmeurer What are your inputs on this ?

skirpichev added a commit to diofant/diofant that referenced this issue Jan 6, 2016

Interval now support extended_real end points
This also corrects definition of Reals and
fixes sympy/sympy#10326.

skirpichev added a commit to diofant/diofant that referenced this issue Jan 6, 2016

Interval now support extended_real end points
This also corrects definition of Reals and
fixes sympy/sympy#10326.

Fix places, where open boundaries were assumed.

smichr added a commit to smichr/sympy that referenced this issue Jan 22, 2016

smichr added a commit to smichr/sympy that referenced this issue Jan 23, 2016

smichr added a commit to smichr/sympy that referenced this issue Jan 23, 2016

smichr added a commit to smichr/sympy that referenced this issue Jan 24, 2016

skirpichev added a commit to skirpichev/diofant that referenced this issue Feb 1, 2017

skirpichev added a commit to skirpichev/diofant that referenced this issue Mar 17, 2017

skirpichev added a commit to skirpichev/diofant that referenced this issue Mar 18, 2017

Add explicit tests for some singletons in Inteval._contains
And more tests for sympy/sympy#10326

// edited by skirpichev

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment