#12967: bugs in comparisons between constants, wrapped pyobjects, infinity
-------------------------------------+-------------------------------------
Reporter: dkrenn | Owner: burcin
Type: defect | Status: needs_work
Priority: major | Milestone: sage-6.6
Component: symbolics | Resolution:
Keywords: compare pi | Merged in:
infinity bool | Reviewers: Karl-Dieter Crisman
Authors: Travis Scrimshaw, | Work issues:
Ralf Stephan | Commit:
Report Upstream: N/A | 91cd2a666102e9442c84642e5dcd4e7dba193947
Branch: | Stopgaps:
u/rws/comparison_of_pi_and_infinity_wrong|
Dependencies: |
-------------------------------------+-------------------------------------
Changes (by rws):
* status: needs_review => needs_work
Comment:
It was wrong to always raise an exception when an interval was compared.
The reason why `pi in RIF` was `True` rather lies in
`structure.parent.py:Parent.contains()` where the line
{{{
EQ = (x2 == x)
}}}
didn't account for symbolics and should read
{{{
EQ = bool(x2 == x)
}}}
This uncovers another bug in `Expression.nonzero()` which shows as
{{{
sage: bool(sqrt(2)==CC(sqrt(2)))
False
}}}
because `sqrt(2) == 1.41421356237309` is `False`. Any ideas how to fit
this in the current code?
--
Ticket URL: <http://trac.sagemath.org/ticket/12967#comment:28>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.