Skip to content
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

is_prime_power fails on powers of 30011 #20025

Closed
jpflori opened this issue Feb 8, 2016 · 24 comments
Closed

is_prime_power fails on powers of 30011 #20025

jpflori opened this issue Feb 8, 2016 · 24 comments

Comments

@jpflori
Copy link

jpflori commented Feb 8, 2016

Playing with finite fields on Sage 6.10 or 7.0:

GF(30011**(19*3), name='z')
...
ValueError: the order of a finite field must be a prime power

Apparently is_prime_power returns False for that cardinality.

PARI bug report:
http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1782

Tarball: http://sage.ugent.be/www/jdemeyer/sage/pari-2.8-2341-g61b65cc.tar.gz

Upstream: Fixed upstream, but not in a stable release.

CC: @videlec

Component: basic arithmetic

Author: Jeroen Demeyer

Branch/Commit: 9c5d20c

Reviewer: Jean-Pierre Flori

Issue created by migration from https://trac.sagemath.org/ticket/20025

@jpflori jpflori added this to the sage-7.1 milestone Feb 8, 2016
@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Feb 8, 2016

comment:1

:-P

sage: print [i for i in range(1,100) if not is_prime_power(30011**i)]
[22, 26, 33, 34, 38, 39, 44, 46, 51, 52, 55, 57, 58, 62, 65, 66, 68, 69, 74, 76, 77, 78, 82, 85, 86, 87, 88, 91, 92, 93, 94, 95, 99]

@jpflori
Copy link
Author

jpflori commented Feb 8, 2016

comment:2

Thanks, I was building the latest beta to see if the PARI update changed anything (though I could not say at this point if PARI is involved).
It seems its not the case.

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Feb 8, 2016

comment:3

Funny

sage: set([p for i in range(1,100) for p in primes(200000) if not is_prime_power(p**i)])
{30011}

@jpflori
Copy link
Author

jpflori commented Feb 8, 2016

comment:4

So it is an issue in the PARI versions we ship (at least the one in 7.0):

? isprimepower(30011^(17*3))
OddPwrs: examining 758-bit integer
OddPwrs: examining 252-bit integer

OddPwrs: not a power
Z_isanypower: now k=3, x=252-bit

OddPwrs: [17] passed modular checks
%1 = 0

@jpflori
Copy link
Author

jpflori commented Feb 8, 2016

comment:5

I attempted to send a bug report upstream.
If it appears on their bugtracker, I'll report here.

@jpflori
Copy link
Author

jpflori commented Feb 8, 2016

Upstream: Reported upstream. No feedback yet.

@jpflori
Copy link
Author

jpflori commented Feb 8, 2016

@jpflori

This comment has been minimized.

@jdemeyer
Copy link

jdemeyer commented Feb 8, 2016

comment:8

I tried all primes up to 106 and still only 30011 fails.

@jpflori
Copy link
Author

jpflori commented Feb 9, 2016

Changed upstream from Reported upstream. No feedback yet. to Fixed upstream, but not in a stable release.

@jpflori
Copy link
Author

jpflori commented Feb 9, 2016

comment:9

Fixed in master according to Karim, though he did not push the commit yet :)

@jdemeyer
Copy link

jdemeyer commented Feb 9, 2016

comment:10

Let's me know when it's fixed in PARI master, then I can make a package.

@jpflori
Copy link
Author

jpflori commented Feb 9, 2016

@jdemeyer
Copy link

jdemeyer commented Feb 9, 2016

Author: Jeroen Demeyer

@jdemeyer jdemeyer changed the title is_prime_power fails on some inputs is_prime_power fails on powers of 30011 Feb 9, 2016
@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link

jdemeyer commented Feb 9, 2016

@jdemeyer
Copy link

jdemeyer commented Feb 9, 2016

Commit: ddf018b

@jdemeyer
Copy link

jdemeyer commented Feb 9, 2016

comment:15

I did not yet run full doctests, but otherwise this seems to work.


New commits:

ddf018bUpgrade PARI to latest master

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 10, 2016

Changed commit from ddf018b to 9c5d20c

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 10, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

9c5d20cFix gamma_inc doctest

@jdemeyer
Copy link

comment:17

Doctests pass now.

@jpflori
Copy link
Author

jpflori commented Feb 10, 2016

comment:18

Thanks, looks ok.

@jpflori
Copy link
Author

jpflori commented Feb 10, 2016

Reviewer: Jean-Pierre Flori

@vbraun
Copy link
Member

vbraun commented Feb 11, 2016

Changed branch from u/jdemeyer/is_prime_power_fails_on_some_inputs to 9c5d20c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants