Opened 8 years ago
Last modified 4 years ago
#14069 new defect
algebraic number < +Infinity return False
Reported by: | slabbe | Owned by: | davidloeffler |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | number fields | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
This bug was reported to me by Xavier Provençal:
sage: M3 = matrix(3,[-1,1,0,-1,0,1,1,0,0]) sage: a = M3.eigenvalues()[0] sage: a 0.5436890126920763? sage: a < oo # <---- this should return True False sage: a > -oo True sage: float(a) < oo True
Change History (10)
comment:1 Changed 8 years ago by
- Type changed from PLEASE CHANGE to defect
comment:2 Changed 8 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:3 Changed 7 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:4 Changed 7 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:5 follow-up: ↓ 7 Changed 7 years ago by
comment:6 Changed 7 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:7 in reply to: ↑ 5 Changed 6 years ago by
Replying to pbruin:
This happens because
QQbar
does not coerce intoInfinityRing
(which is probably correct), and the coercion model does not discoverUnsignedInfinityRing
as a common parent. (Note thata < unsigned_infinity
does work correctly.)
In fact it could be argued that the result is correct, since QQbar
is not ordered, and AA(a) < infinity
works. I'm tempted to suggest closing the ticket as wontfix.
comment:8 follow-up: ↓ 9 Changed 5 years ago by
with recent sage we get
sage: a < oo True sage: a < -oo True sage: -a < oo True sage: -a < -oo True
is that consistant/correct?
comment:9 in reply to: ↑ 8 Changed 5 years ago by
Replying to jakobkroeker:
with recent sage we get
sage: a < oo True sage: a < -oo True sage: -a < oo True sage: -a < -oo Trueis that consistant/correct?
The second and third answers are "obviously" false at first sight, but there is probably no "good" way to compare with signed infinity in QQbar
. I think this should either be closed as wontfix (as in comment:7) or that UnsignedInfinityRing
should be discovered as a common parent.
comment:10 Changed 4 years ago by
The second and third answers are "obviously" false at first sight, but there is probably no >"good" way to compare with signed infinity in QQbar.
If there is no good way to compare with signed infinity in QQbar it should be incomparable?(IMHO)
This happens because
QQbar
does not coerce intoInfinityRing
(which is probably correct), and the coercion model does not discoverUnsignedInfinityRing
as a common parent. (Note thata < unsigned_infinity
does work correctly.)