Opened 6 years ago
Closed 6 years ago
#20025 closed defect (fixed)
is_prime_power fails on powers of 30011
Reported by:  jpflori  Owned by:  

Priority:  critical  Milestone:  sage7.1 
Component:  basic arithmetic  Keywords:  
Cc:  vdelecroix  Merged in:  
Authors:  Jeroen Demeyer  Reviewers:  JeanPierre Flori 
Report Upstream:  Fixed upstream, but not in a stable release.  Work issues:  
Branch:  9c5d20c (Commits, GitHub, GitLab)  Commit:  9c5d20c2e9a44f8503bca15dc64f04453929a552 
Dependencies:  Stopgaps: 
Description (last modified by )
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.ubordeaux.fr/cgibin/bugreport.cgi?bug=1782
Tarball: http://sage.ugent.be/www/jdemeyer/sage/pari2.82341g61b65cc.tar.gz
Change History (19)
comment:1 Changed 6 years ago by
comment:2 Changed 6 years ago by
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.
comment:3 Changed 6 years ago by
Funny
sage: set([p for i in range(1,100) for p in primes(200000) if not is_prime_power(p**i)]) {30011}
comment:4 Changed 6 years ago by
So it is an issue in the PARI versions we ship (at least the one in 7.0):
? isprimepower(30011^(17*3)) OddPwrs: examining 758bit integer OddPwrs: examining 252bit integer OddPwrs: not a power Z_isanypower: now k=3, x=252bit OddPwrs: [17] passed modular checks %1 = 0
comment:5 Changed 6 years ago by
I attempted to send a bug report upstream. If it appears on their bugtracker, I'll report here.
comment:6 Changed 6 years ago by
 Report Upstream changed from N/A to Reported upstream. No feedback yet.
comment:7 Changed 6 years ago by
 Description modified (diff)
comment:8 Changed 6 years ago by
I tried all primes up to 10^{6} and still only 30011 fails.
comment:9 Changed 6 years ago by
 Report Upstream changed from Reported upstream. No feedback yet. to Fixed upstream, but not in a stable release.
Fixed in master according to Karim, though he did not push the commit yet :)
comment:10 Changed 6 years ago by
Let's me know when it's fixed in PARI master, then I can make a package.
comment:11 Changed 6 years ago by
comment:12 Changed 6 years ago by
 Summary changed from is_prime_power fails on some inputs to is_prime_power fails on powers of 30011
comment:13 Changed 6 years ago by
 Description modified (diff)
comment:14 Changed 6 years ago by
 Branch set to u/jdemeyer/is_prime_power_fails_on_some_inputs
comment:15 Changed 6 years ago by
 Commit set to ddf018bf6ade9ddc4bd2fcf0e0345e2ff8a783ec
 Status changed from new to needs_review
I did not yet run full doctests, but otherwise this seems to work.
New commits:
ddf018b  Upgrade PARI to latest master

comment:16 Changed 6 years ago by
 Commit changed from ddf018bf6ade9ddc4bd2fcf0e0345e2ff8a783ec to 9c5d20c2e9a44f8503bca15dc64f04453929a552
Branch pushed to git repo; I updated commit sha1. New commits:
9c5d20c  Fix gamma_inc doctest

comment:17 Changed 6 years ago by
Doctests pass now.
comment:18 Changed 6 years ago by
 Reviewers set to JeanPierre Flori
 Status changed from needs_review to positive_review
Thanks, looks ok.
comment:19 Changed 6 years ago by
 Branch changed from u/jdemeyer/is_prime_power_fails_on_some_inputs to 9c5d20c2e9a44f8503bca15dc64f04453929a552
 Resolution set to fixed
 Status changed from positive_review to closed
:P