#13692: factor_trial_division returns Python longs as exponents
---------------------------------+------------------------------------------
Reporter: dimpase | Owner: was
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.5
Component: number theory | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Nils Bruin | Merged in:
Dependencies: | Stopgaps:
---------------------------------+------------------------------------------
Changes (by {'newvalue': u'Nils Bruin', 'oldvalue': ''}):
* status: new => needs_review
* author: => Nils Bruin
Comment:
Problem was that exponent was a `cdef unsigned long`, which doesn't
necessarily fit in a python int, so apparently cython converts that to a
python long automatically.
By defining it to be a `cdef long` instead I don't think we'll get any
overflow (it's an exponent of a prime in the factorization of an integer!)
and now the exponent is returned as a `python int` instead. Unless people
feel strongly that this should be cast to a `Integer` instead, I think
this should be sufficient.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13692#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 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.