![]() |
![]() |
#1 |
Jun 2003
150116 Posts |
![]()
1. What is the fastest known algorithm for computing a factorial modulo a prime?
2. What is the state-of-the-art in implementing such an algorithm? |
![]() |
![]() |
![]() |
#2 |
(loop (#_fork))
Feb 2006
Cambridge, England
33×239 Posts |
![]() |
![]() |
![]() |
![]() |
#3 | |
Mar 2011
Germany
97 Posts |
![]()
Hi, I also just wanted to add something:
Quote:
http://www.google.com/url?sa=t&sourc...fV5U-g&cad=rja If you really mean the Wilson Prime Test (p-1)! = -1 (mod p^2) then the paper fivemack pointed to is to my knowledge the fastest way, but only if you want to calculate it for a single prime. There is a way to speed up everything if you want to calculate a whole range, assuming you have enough memory. I programmed both methods, the fast but memory intensive variant using gmp and the reduced scheme from the paper. Both are much faster than the simple scheme from the Wilson Prime search project on Boinc (http://www.ibercivis.es/ , careful, this site is in Spanish only, project is well hidden). Source code for this project you find here: https://github.com/Ibercivis/Wilson I wrote an email to the developer for simple but very effective changes in the code for speedup (factor 4), but did not get an answer yet. If somebody is interested I can post my C++ source code and executables here for both variants I programmed. Cheers, Danilo Last fiddled with by MrRepunit on 2011-08-14 at 19:05 |
|
![]() |
![]() |
![]() |
#4 |
"Forget I exist"
Jul 2009
Dumbassville
203008 Posts |
![]() |
![]() |
![]() |
![]() |
#5 | |
Mar 2011
Germany
97 Posts |
![]() Quote:
There is also no status or progress update on this project, a few days ago it was the only running project from this site, at least it was the only project I got some workunits. |
|
![]() |
![]() |
![]() |
#6 |
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
![]()
well I get everything that isn't a picture mostly or titles to links
|
![]() |
![]() |
![]() |
#7 |
Mar 2011
Germany
97 Posts |
![]()
Well, I just noted that they created an English web page, so ignore my last statements on this.
http://www.ibercivis.net |
![]() |
![]() |
![]() |
#8 | ||
Jun 2003
19×283 Posts |
![]() Quote:
Quote:
I am interested. ![]() |
||
![]() |
![]() |
![]() |
#9 |
Mar 2011
Germany
97 Posts |
![]()
Okay, here you are.
Wilson-fast is the fast but memory intensive algorithm written in C. WilsonPrimeSearch is the implementation of the paper in C++, parts of it are based on the Wilson Prime Search Project of ibercivis. Executables for Linux 64 Bit (compiled under Ubuntu 11.04 64 Bit) are included. If there are some questions do not hesitate to ask. Cheers, Danilo |
![]() |
![]() |
![]() |
#10 | |
Jun 2003
19·283 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#11 | |
(loop (#_fork))
Feb 2006
Cambridge, England
11001001101012 Posts |
![]() Quote:
(I take 800 microseconds to compute 103040! mod (10^9+7) by the stupid method, and it looks as if gp will take about 27 hours to do a pseudoprime test on 103040!+1, which suggests you only have time to trial-factor to 2^31 or so ... of course trial-factoring factorial primes has GPU written all over it in twelve-foot letters of fire) ie I wonder if it would be better to look at lots of potential factors simultaneously using quick arithmetic. But I'm sure you've investigated this already. Last fiddled with by fivemack on 2011-08-15 at 14:49 |
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
World Record Factorial Prime Found | rogue | Lounge | 8 | 2012-03-02 16:41 |
square root modulo prime | Raman | Math | 1 | 2010-02-16 21:25 |
Order of 3 modulo a Mersenne prime | T.Rex | Math | 7 | 2009-03-13 10:46 |
Period of Lucas Sequence modulo a prime | T.Rex | Math | 7 | 2007-06-04 21:30 |
Conjecture about multiplicative order of 3 modulo a Mersenne prime | T.Rex | Math | 9 | 2007-03-26 17:35 |