#4612: [with patch, needs work] is_perfect_power for rationals
------------------------------+---------------------------------------------
 Reporter:  robertwb          |        Owner:  somebody
     Type:  defect            |       Status:  new     
 Priority:  major             |    Milestone:  sage-3.4
Component:  basic arithmetic  |   Resolution:          
 Keywords:                    |  
------------------------------+---------------------------------------------
Comment (by robertwb):

 A new patch is up. If n/d is a not perfect power, it is usually cheaper to
 check min(n,d) for being a perfect power first, but that is redundant if
 n/d is in fact a perfect power. I added an extra parameter to handle that,
 let me know if you think it's a good idea or excessive.

 It is more work to figure out the maximal exponent a number can be
 expressed with than it is to detect whether it can be expressed with any
 exponent. For example, consider $p^(2r) / q^(2s)$. It is easy to detect
 that both are perfect squares, but finding r and s is more work.

 Clearly, the optimal solution would look something like gmp's
 mpz_perfect_power_p done in parallel on the numerator and denominator.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4612#comment:8>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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