#13259: Correcting implementation of "negative" quantum integers
-----------------------------------+----------------------------------------
Reporter: andrew.mathas | Owner: sage-combinat
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-5.3
Component: combinatorics | Resolution:
Keywords: quantum integer | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
-----------------------------------+----------------------------------------
Comment (by andrew.mathas):
Thanks for your review. I agree with all of your suggestions except for
changing the return statement when n<0 to:
{{{
return -p**n * sum([p**i for i in range(-n)])
}}}
because multiplying polynomials tends to be expensive. Perhaps you thought
the previous use of `range(-1,n-1,-1))` wasn't very nice? If so this could
be replaced by
{{{
return sum([-p**(n+i) for i in range(-n)])
}}}
I am also not very experienced as to what happens next i the review
process... Because this patch is so short I am tempted to just incorporate
your changes and post a new version.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13259#comment:6>
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.