#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 cremona):
Replying to [comment:10 robertwb]:
> Integer.is_perfect_power is a direct call to mpz_perfect_power_p. Looks
like a bug in gmp to me. That's really bad.
{{{
sage: len([a for a in srange(100) if not (-a^3).is_perfect_power()])
24
}}}
Experiment shows that it gives the wrong answer for {{{-a^3}}} whenever a
is not square-free.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4612#comment:11>
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
-~----------~----~----~----~------~----~------~--~---