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

Fix a bug in sorting RealSets #17714

Closed
yuan-zhou opened this issue Feb 2, 2015 · 8 comments
Closed

Fix a bug in sorting RealSets #17714

yuan-zhou opened this issue Feb 2, 2015 · 8 comments

Comments

@yuan-zhou
Copy link

Find a bug:

sage: RealSet((0, 1),[1, 1],(1, 2))
(0, 1) + [1, 2)

should return

(0, 2)

This can be fixed by a modification in RealInterval.__cmp__: when comparing two intervals with the same lower bound, put lower_closed before lower_open. i.e. [a, b] < (a, c].

CC: @tscrim @vbraun

Component: calculus

Keywords: real_set

Author: Yuan Zhou

Branch/Commit: 97e50b5

Reviewer: Ralf Stephan

Issue created by migration from https://trac.sagemath.org/ticket/17714

@yuan-zhou yuan-zhou added this to the sage-6.5 milestone Feb 2, 2015
@yuan-zhou
Copy link
Author

Changed keywords from none to real_set

@yuan-zhou
Copy link
Author

Author: Yuan Zhou

@rwst
Copy link

rwst commented Feb 17, 2015

comment:3

Thanks. Please always include a doctest, and set needs review. I will do it this time and do the review, as well.

@rwst
Copy link

rwst commented Feb 17, 2015

Changed branch from u/yzh/test_branch to u/rws/test_branch

@rwst
Copy link

rwst commented Feb 17, 2015

Reviewer: Ralf Stephan

@rwst
Copy link

rwst commented Feb 17, 2015

Changed commit from 20cbe14 to 97e50b5

@rwst
Copy link

rwst commented Feb 17, 2015

comment:5

This looks fine, tests OK with make ptestlong.


New commits:

97e50b517714 reviewer's patch: add doctest, cosmetics

@vbraun
Copy link
Member

vbraun commented Feb 18, 2015

Changed branch from u/rws/test_branch to 97e50b5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants