-
-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perfect_power for integers #12116
Comments
comment:1
The bug is being tracked by Pari: their ticket number is 1259. |
Changed upstream from Not yet reported upstream; Will do shortly. to Reported upstream. Little or no feedback. |
comment:3
Here's the response from the Pari developers:
That was quick. :-) |
Changed upstream from Reported upstream. Little or no feedback. to Fixed upstream, but not in a stable release. |
comment:4
I'm curious why you didn't use the Sphinx seealso directive: http://sphinx.pocoo.org/markup/para.html#directive-seealso |
comment:5
No good reason. Apply 12116.2.patch only. |
comment:6
Sadly roed's patch conflicts with #10596 and thus doesn't apply to the current Sage beta. I've just uploaded a rebased patch based on 5.0.beta7. This makes no changes to roed's code other than some minor sphinx reformatting (including using the new :trac: directive to point to this ticket). David: if you're happy with my reworking of your patch, you can set this to positive review. |
Dependencies: 10596 |
Reviewer: David Loeffler |
Changed dependencies from 10596 to #10596 |
comment:8
Thanks for rebasing! I looked it over and it looks good to me. |
This comment has been minimized.
This comment has been minimized.
Changed upstream from Fixed upstream, but not in a stable release. to Completely fixed; Fix reported upstream |
comment:9
The upstream fix is in Sage now (#12363). Could you remove the workaround code from the patch? |
Changed upstream from Completely fixed; Fix reported upstream to None of the above - read trac for reasoning. |
comment:10
Can we have a new option for the "Report Upstream" menu, "upstream claim to have fixed it but they apparently haven't"? PARI apparently believes that
So I suggest we merge this patch as it is, and send another bug report to PARI -- roed, can you do the honours? |
comment:11
I reported the new issue upstream. I would postpone merging this patch until we hear from upstream. I prefer to have the issue fixed upstream and not apply a work-around in Sage. |
Attachment: trac_12116-rebase.patch.gz Rebased against 5.8.beta0 |
comment:24
Alright, fixed. |
Changed reviewer from David Loeffler to David Loeffler, Aly Deines |
Attachment: trac_12116_rebase2.patch.gz Flips order of returned pair in self.perfect_power() |
comment:26
Everything checks out. Patch applies, tests pass. However:
So
I know the code just wraps PARI which returns the integers in this order, but this seems an unnatural way to order the returned pair. I've uploaded a modified version of the patch so that we get
which feels a lot more natural. The new patch also fixes a possible formatting error in the documentation of
becomes
|
Changed reviewer from David Loeffler, Aly Deines to David Loeffler, Aly Deines, Simon Spicer |
Attachment: trac_12116-rebase3.patch.gz |
comment:29
Looks fine to me. I just updated the |
Attachment: trac_12116-rebase4.patch.gz Changed a line to unbreak factor_aurifeuillian() in factorint.pyx |
comment:30
We missed another line. In
This must now become
otherwise this method breaks with the new ordering of values returned by Hopefully that should be it. |
This comment has been minimized.
This comment has been minimized.
comment:31
Looks good to me. |
comment:32
For patchbot: Apply trac_12116-rebase4.patch |
Merged: sage-5.8.beta3 |
Currently there are two functions for testing whether an integer is a perfect power:
is_power
.perfect_power
, wrapping PARI'sispower
function, expressing an integer in the form ab withb
maximal.is_perfect_power
,is_power_of
,is_prime_power
andperfect_power
.This revealed three bugs in PARI's
ispower()
function:Apply attachment: trac_12116-rebase4.patch
Depends on #10596
Depends on #12363
Depends on #12638
Upstream: Fixed upstream, but not in a stable release.
CC: @jpflori
Component: basic arithmetic
Author: David Roe
Reviewer: David Loeffler, Aly Deines, Simon Spicer
Merged: sage-5.8.beta3
Issue created by migration from https://trac.sagemath.org/ticket/12116
The text was updated successfully, but these errors were encountered: