#12615: sign(integer) is horribly slow
------------------------------------+---------------------------------------
Reporter: zimmerma | Owner: AlexGhitza
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.6
Component: basic arithmetic | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
------------------------------------+---------------------------------------
Changes (by robertwb):
* status: new => needs_review
Comment:
Attached a patch to add sign() methods to QQ and ZZ. The sign(x) function
is still really slow because
{{{
sage: sign.__call__??
def __call__(self, *args, coerce=True, hold=False):
"""
Evaluates this function at the given arguments.
We coerce the arguments into symbolic expressions if coerce=True,
then
call the Pynac evaluation method, which in turn passes the
arguments to
a custom automatic evaluation method if ``_eval_()`` is defined.
}}}
in other words, it creates SR(x) and a ginac representation of the call
before finally calling x.sign(). Ugh, I've filed #13933.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12615#comment:8>
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.