Opened 8 years ago

Last modified 5 years ago

#11613 new defect

RealInterval expression comparisons broken

Reported by: eviatarbach Owned by: burcin
Priority: major Milestone: sage-6.4
Component: symbolics Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by eviatarbach)

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:

Change History (6)

comment:1 Changed 8 years ago by mhansen

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

comment:2 Changed 8 years ago by eviatarbach

  • Description modified (diff)
  • Summary changed from RIF comparisons broken to RealInterval expression comparisons broken

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

comment:3 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:4 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:5 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:6 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.