#15404: Change coprime_integers(n) in Integer class to use sieving instead of
naive
gcd
--------------------------------+------------------------------------
Reporter: spice | Owner: Simon Spicer
Type: enhancement | Status: new
Priority: minor | Milestone: sage-5.13
Component: basic arithmetic | Keywords: coprime, integer
Merged in: | Authors: Simon Spicer
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
--------------------------------+------------------------------------
As written currently, the coprime_integers(n) method in the Integer class
uses gcd naively:
{{{
def coprime_integers(self, m):
...
v = []
for n in range(1,m):
if self.gcd(n) == 1:
v.append(Integer(n))
return v
}}}
This method should be rewritten to use sieving to speed things up.
--
Ticket URL: <http://trac.sagemath.org/ticket/15404>
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.
For more options, visit https://groups.google.com/groups/opt_out.