#12116: perfect_power for integers
----------------------------------------------------------------+-----------
Reporter: roed |
Owner: AlexGhitza
Type: enhancement |
Status: positive_review
Priority: major |
Milestone: sage-5.8
Component: basic arithmetic |
Resolution:
Keywords: | Work
issues:
Report Upstream: Fixed upstream, but not in a stable release. |
Reviewers: David Loeffler, Aly Deines, Simon Spicer
Authors: David Roe | Merged
in:
Dependencies: #10596, #12363, #12638 |
Stopgaps:
----------------------------------------------------------------+-----------
Changes (by roed):
* status: needs_review => positive_review
Old description:
> Currently there are two functions for testing whether an integer is a
> perfect power:
> {{{
> sage: 8.is_power()
> True
> sage: 8.is_perfect_power()
> True
> }}}
>
> * This patch deprecates `is_power`.
> * It implements a new function, `perfect_power`, wrapping PARI's
> `ispower` function, expressing an integer in the form a^b^ with `b`
> maximal.
> * It adds cross references between `is_perfect_power`, `is_power_of`,
> `is_prime_power` and `perfect_power`.
>
> This revealed three bugs in PARI's `ispower()` function:
> 1. Two issues reported and fixed at [http://pari.math.u-bordeaux.fr/cgi-
> bin/bugreport.cgi?bug=1259]
> 2. One more issue reported and fixed at [http://pari.math.u-bordeaux.fr
> /cgi-bin/bugreport.cgi?bug=1302] (duplicate:
> [http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1303])
New description:
Currently there are two functions for testing whether an integer is a
perfect power:
{{{
sage: 8.is_power()
True
sage: 8.is_perfect_power()
True
}}}
* This patch deprecates `is_power`.
* It implements a new function, `perfect_power`, wrapping PARI's
`ispower` function, expressing an integer in the form a^b^ with `b`
maximal.
* It adds cross references between `is_perfect_power`, `is_power_of`,
`is_prime_power` and `perfect_power`.
This revealed three bugs in PARI's `ispower()` function:
1. Two issues reported and fixed at [http://pari.math.u-bordeaux.fr/cgi-
bin/bugreport.cgi?bug=1259]
2. One more issue reported and fixed at [http://pari.math.u-bordeaux.fr
/cgi-bin/bugreport.cgi?bug=1302] (duplicate:
[http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1303])
'''Apply''' [attachment:trac_12116-rebase4.patch]
--
Comment:
Looks good to me.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12116#comment:31>
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.