#13642: Modular exponentiation of polynomials
-------------------------------------------------------+--------------------
Reporter: caruso | Owner:
AlexGhitza
Type: defect | Status:
needs_work
Priority: major | Milestone:
sage-5.7
Component: algebra | Resolution:
Keywords: modular exponentiation, polynomials | Work issues:
Report Upstream: N/A | Reviewers: Burcin
Erocal
Authors: caruso | Merged in:
Dependencies: | Stopgaps:
-------------------------------------------------------+--------------------
Changes (by burcin):
* status: needs_review => needs_work
* reviewer: => Burcin Erocal
Comment:
Thanks for the patch. There are some minor issues, so I'm switching to
needs_work. Here is a short review:
* The patch lacks doctests or a commit message.
* The call to `_pow_modulus` should be of the form
`self._pow_modulus(right, modulus)` instead of
`Polynomial._pow_modulus(self, right, modulus)`. If Cython does not
recognize that `self` is a `Polynomial`, you can declare that in the
function definition, e.g. use `def __pow__(Polynomial self, right,
modulus)`.
* To extract maximum performance, I suggest replacing calls to
`self.parent()` by direct attribute access (`self._parent`) and declaring
the type of the `n` in the `_pow_modulus()` function to be an `int`, and
`pow` to be `Polynomial`.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13642#comment:2>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.