#16880: further cleanup in arith.py/integer.pyx
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.6
Component: number theory | Resolution:
Keywords: | Merged in:
Authors: Vincent Delecroix | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vdelecroix/16880 | 25176c520e538f0a98334c7ffdfe69c14207b32d
Dependencies: #16878, #17852 | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by vdelecroix):
* status: needs_work => needs_review
Old description:
> This ticket introduces several changes:
> - introduce a method `next_prime_power` for integers
> - make `prime_powers` an iterator (using `next_prime_power`) so that it
> can be used for large integers as well
> - create a much faster cythonized `prime_power_range`
>
> We get a little speed down for the iteration over `prime_powers` but we
> can now do
> {{{
> sage: for p in prime_powers(2**100, 2**100+500):
> ....: print p
> 1267650600228229401496703205376
> 1267650600228229401496703205653
> 1267650600228229401496703205707
> 1267650600228229401496703205823
> }}}
> The cython function `prime_power_range` is much faster than the previous
> `prime_powers` (around x4 in the timings).
>
> Since #16878, 1 is not a prime power anymore! So we fix `prime_powers` to
> never return 1 in its output.
New description:
In this ticket we:
- introduce methods `previous_prime`, `next_prime_power`,
`previous_prime_power` for integers
- split `prime_range` in `rings/fast_arith.pyx` into two subfunctions and
optimize them
- create a faster cythonized `prime_power_range` and propose two
implementations for `arith.prime_powers`
- add `rings/fast_arith.pyx` to the documentation
--
--
Ticket URL: <http://trac.sagemath.org/ticket/16880#comment:14>
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/d/optout.