#17130: Fix coercion bugs in symbolic functions
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.4
Component: symbolics | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/ticket/17130 | b6e1ed44a663f7410fddb2e3e4c134aa3a0ce8cf
Dependencies: #17131, #17133 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by kcrisman):
* Deprecation, folks.
* No, it isn't long, but I at least need to think about the mechanism by
which things are evaluated and want to make sure we don't miss any odd
cases. `_eval_` has been fairly standard for quite some time.
* I agree that the naming is problematic no matter what name you choose.
I think the rings folks had some good reasons for their choices:
{{{
cpdef bint is_exact(self) except -2:
"""
Test whether the ring is exact.
.. NOTE::
This defaults to true, so even if it does return ``True``
you have no guarantee (unless the ring has properly
overloaded this).
OUTPUT:
Return True if elements of this ring are represented exactly,
i.e.,
there is no precision loss when doing arithmetic.
EXAMPLES::
sage: QQ.is_exact()
True
sage: ZZ.is_exact()
True
sage: Qp(7).is_exact()
False
sage: Zp(7, type='capped-abs').is_exact()
False
"""
return True
}}}
but the symbolic ring might have inexact stuff in it, so
{{{
Definition: SR.is_exact(self)
Source:
cpdef bint is_exact(self) except -2:
"""
Return False, because there are approximate elements in the
symbolic ring.
EXAMPLES::
sage: SR.is_exact()
False
Here is an inexact element.
::
sage: SR(1.9393)
1.93930000000000
"""
return False
}}}
does that make sense?
--
Ticket URL: <http://trac.sagemath.org/ticket/17130#comment:24>
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.