#4612: [with patch, with positive review, needs review of second patch]
is_perfect_power for rationals
------------------------------+---------------------------------------------
Reporter: robertwb | Owner: somebody
Type: defect | Status: new
Priority: major | Milestone: sage-3.2.1
Component: basic arithmetic | Resolution:
Keywords: |
------------------------------+---------------------------------------------
Changes (by craigcitro):
* summary: [with patch, needs review] is_perfect_power for rationals =>
[with patch, with positive review, needs review
of second patch] is_perfect_power for rationals
Comment:
The code looks good, but doesn't handle negatives correctly:
{{{
sage: (-1/25).is_perfect_power()
True
}}}
Fix is pretty obvious (call `mpz_sgn` on the numerator, make sure we don't
get -1), so I'm adding a patch that fixes it.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4612#comment:1>
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
-~----------~----~----~----~------~----~------~--~---