#12967: comparison of pi and infinity wrong
--------------------------------------------+-------------------------------
Reporter: dkrenn | Owner: burcin
Type: defect | Status: new
Priority: major | Milestone: sage-5.1
Component: symbolics | Resolution:
Keywords: compare pi infinity bool | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
--------------------------------------------+-------------------------------
Comment (by burcin):
ATM, this is caused by #11506:
{{{
sage: pi.pyobject()
pi
sage: type(pi.pyobject())
<class 'sage.symbolic.constants.Pi'>
sage: pi.pyobject() < oo
False
sage: pi.pyobject() > oo
True
}}}
With #12950, comparison of infinities in Pynac changed. Now I get:
{{{
sage: bool(pi>Infinity)
False
sage: bool(pi<Infinity)
False
}}}
which is better. I hope with the ordering patches in the Pynac queue this
will improve.
The results of comparison with `e` is not relevant in this case. `e` is
not a constant in Pynac, it is the `exp()` function. Once you form the
relational expression `e < Infinity`, the comparison is handled
differently.
I suggest adding a patch with doctests reflecting the new behavior with
#12950 and closing this ticket when #12950 is merged.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12967#comment:1>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.