#9588: Extend is_prime_power to negative exponents
--------------------------------+-------------------------------------------
   Reporter:  arminstraub       |       Owner:  AlexGhitza    
       Type:  enhancement       |      Status:  new           
   Priority:  minor             |   Milestone:                
  Component:  basic arithmetic  |    Keywords:  is_prime_power
     Author:                    |    Upstream:  N/A           
   Reviewer:                    |      Merged:                
Work_issues:                    |  
--------------------------------+-------------------------------------------
 Currently, is_prime_power only works on integers.  The attached simple
 patch will allow rational numbers as input as illustrated below.

 {{{
 sage: is_prime_power(1/2197)
 True
 sage: is_prime_power(1/100)
 False
 sage: is_prime_power(2/5)
 False
 }}}

 This is also the behavior of Mathematica's PrimePowerQ function.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9588>
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.

Reply via email to