Opened 7 years ago
Last modified 5 years ago
#16397 closed defect
Symbolic cmp — at Version 2
Reported by: | vbraun | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | sage-7.1 |
Component: | symbolics | Keywords: | |
Cc: | vdelecroix, mmezzarobba, jpflori | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
In the symbolic ring, cmp implements the print comparison which is probably not what you envisioned:
sage: cmp(1, sqrt(2)) # mathematically correct, uses rich comparison -1 sage: cmp(SR(1), sqrt(2)) # unexpectedly, you get the print sort order 1
Everybody who coerces to same parents internally before comparing trips over this, for example the real lazy field:
sage: RLF(1) < RLF(sqrt(2)) False
Change History (2)
comment:1 Changed 7 years ago by
- Component changed from PLEASE CHANGE to symbolics
- Description modified (diff)
- Type changed from PLEASE CHANGE to defect
comment:2 Changed 7 years ago by
- Description modified (diff)
Note: See
TracTickets for help on using
tickets.