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

RealInterval expression comparisons broken #11613

Open
eviatarbach opened this issue Jul 20, 2011 · 3 comments
Open

RealInterval expression comparisons broken #11613

eviatarbach opened this issue Jul 20, 2011 · 3 comments

Comments

@eviatarbach
Copy link

Expressions involving RealIntervals do not compare properly, returning a TypeError. For example,

sage: bool(RealInterval(4,5)*x==RealInterval(4,5)*x)
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (1006, 0))
TypeError:

Component: symbolics

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

@mwhansen
Copy link
Contributor

comment:1

I think that this is invalid. Here is the relevant documentation:

Comparison operations (==,!=,<,<=,>,>=) return true if every value in
the first interval has the given relation to every value in the
second interval. The cmp(a, b) function works differently; it
compares two intervals lexicographically. (However, the behavior is
not specified if given a non-interval and an interval.)

So,

sage: RIF(3,4) == RIF(3,4)
False
sage: RIF(3,3) == RIF(3,3)
True

@eviatarbach
Copy link
Author

comment:2

Oh, I see. The second bug is still valid though, so I will edit the ticket to reflect this.

@eviatarbach

This comment has been minimized.

@eviatarbach eviatarbach changed the title RIF comparisons broken RealInterval expression comparisons broken Jul 20, 2011
@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@mkoeppe mkoeppe removed this from the sage-6.4 milestone Dec 29, 2022
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

5 participants