#9032: no method numerical_approx for integers and rationals
-------------------------------+--------------------------------------------
Reporter: zimmerma | Owner: AlexGhitza
Type: defect | Status: closed
Priority: major | Milestone: sage-4.6.2
Component: basic arithmetic | Resolution: fixed
Keywords: beginner | Author: Gagan Sekhon
Upstream: N/A | Reviewer: Aly Deines, Willem Jan
Palenstijn, Joanna Gaski
Merged: sage-4.6.2.alpha2 | Work_issues:
-------------------------------+--------------------------------------------
Comment(by kcrisman):
> Is the alias N really needed? It pollutes the namespace of all elements,
and broke some code on the Sage-Combinat queue (in that particular case,
it was overwriting a field of a gap3 record element). Well, I guess we can
find a workaround but still having n and N and numerical_approx seems like
a waste.
N has been an alias for this for a long time, so this just making it
consistent - I think this added a method, not a global function. In a
Sage version nearly a year old:
{{{
sage: N(5)
5.00000000000000
sage: n(5)
5.00000000000000
sage: numerical_approx(5)
5.00000000000000
sage: a=5
sage: a.N?
Object `a.N` not found.
sage: a.n
<built-in method n of sage.rings.integer.Integer object at 0x1091154e0>
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9032#comment:32>
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.