mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Programming

Reply
 
Thread Tools
Old 2008-09-16, 14:58   #34
fivemack
(loop (#_fork))
 
fivemack's Avatar
 
Feb 2006
Cambridge, England

72×131 Posts
Default

You want Colin Percival's paper "Rapid multiplication modulo the sum and difference of highly composite numbers" (http://www.daemonology.net/papers/fft.pdf)

Last fiddled with by fivemack on 2008-09-16 at 14:59
fivemack is offline   Reply With Quote
Old 2008-09-16, 15:14   #35
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

2×53×71 Posts
Default

Quote:
Originally Posted by fivemack View Post
You want Colin Percival's paper "Rapid multiplication modulo the sum and difference of highly composite numbers" (http://www.daemonology.net/papers/fft.pdf)
gwnum uses a different method where k does not have to be highly composite. I think the SoB people wrote about the method recently.
Prime95 is online now   Reply With Quote
Old 2008-09-16, 15:42   #36
nuggetprime
 
nuggetprime's Avatar
 
Mar 2007
Austria

2·151 Posts
Default

is gwnum's method faster? where is it explained(link)?

Last fiddled with by nuggetprime on 2008-09-16 at 15:53
nuggetprime is offline   Reply With Quote
Old 2008-09-16, 18:47   #37
philmoore
 
philmoore's Avatar
 
"Phil"
Sep 2002
Tracktown, U.S.A.

100010111112 Posts
Default

Yes, George made a clever (in my opinion) innovation that improved on Colin Percival's algorithm. The paper describing it has been held up for a few months in the referee stage, but I will look to see if I can put together a short description that might interest readers of this thread. Give me a couple days, as I am preparing for the start of fall term next Monday.
philmoore is offline   Reply With Quote
Old 2008-09-16, 19:05   #38
nuggetprime
 
nuggetprime's Avatar
 
Mar 2007
Austria

4568 Posts
Default

Thanks for your work philmoore.
I might code,with this, a very fast assembler free proggie for Riesel,Proth,N+1,N-1,Prp and other tests.

Regards,
nuggetprime
nuggetprime is offline   Reply With Quote
Old 2008-09-16, 20:05   #39
philmoore
 
philmoore's Avatar
 
"Phil"
Sep 2002
Tracktown, U.S.A.

111910 Posts
Default

I take no credit, but I did summarize work that George described in an email. Here is a summary:

George expanded on the work of Percival to adapt his routines to do computations modulo numbers of the form k*2^n +/- c, thus making his routines of particular value to Seventeen or Bust and Rieselsieve. Treatment of the +/-c term essentially follows the scheme of Percival, but the k*2^n term is treated in a way that allows use of smaller FFT sizes for some exponents than those required by Percival's method. This new scheme involves performing a Mersenne-like DWT on 2^(n+log k) +/- c (All logs denote logarithms in base 2) with weights ranging from 1 to 2 rather than using Percival's weights for k in the FFT word which range from 1 to k, saving approximately log k bits of weighting data, which become 2*log k bits in the inverse FFT word after point-wise squaring. The complication of this scheme is that the ''wrap around'' data is now divided by k, which is dealt with by multiplying each result word by k before rounding to an integer. Carry out of the top word is done very carefully, but is not a major problem. The procedure creates a result that has been multiplied by k, which is circumvented by dealing with numbers in (x / k) mod k*2^n +/- c format. Therefore, to square x, the transform of (x / k) is computed and squared component-wise, after which the inverse transform is taken, giving a result x^2 / k still in the same format, easily adapted to a long series of squarings such as is performed in a probable prime or Proth test. At conclusion of the computation, a final multiplication by k converts the result back into the desired form. The net savings in each inverse FFT word amounts to the equivalent of (log k) / 2 bits in the original input FFT word, allowing in many cases for the use of smaller FFT sizes for the k values under investigation.
philmoore is offline   Reply With Quote
Old 2008-09-16, 22:56   #40
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

25·257 Posts
Default

Where George works:
Attached Thumbnails
Click image for larger version

Name:	george's desk.jpg
Views:	153
Size:	32.1 KB
ID:	2707  
Xyzzy is offline   Reply With Quote
Old 2008-09-17, 02:36   #41
jrk
 
jrk's Avatar
 
May 2008

3·5·73 Posts
Default

At least he has a decent taste in video games. :)
jrk is offline   Reply With Quote
Old 2008-09-18, 14:03   #42
nuggetprime
 
nuggetprime's Avatar
 
Mar 2007
Austria

2·151 Posts
Default How fast is the code?

Is the code I attatched acceptably fast for a tabled dft of 8000 unsigned short elements?
Remember, it's doing DFT,not FFT. And it's not doing inverse DFT.
I'm pretty sure it's not fast enough. If you also think so, can you tell me what can be improved? That would be a great help

--nuggetprime
Attached Files
File Type: gz cdft.tar.gz (651 Bytes, 84 views)

Last fiddled with by nuggetprime on 2008-09-18 at 14:05
nuggetprime is offline   Reply With Quote
Old 2008-09-18, 14:10   #43
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

22×1,549 Posts
Default

Quote:
Originally Posted by Xyzzy View Post
Where George works:
I think that image is a fake. Do you think we are all stupid? Nobody, and I mean nobody, has a workbench as clean as that in the real word. Sheesh! What's next? You'll be telling us that the food is less than 3 months old!
retina is online now   Reply With Quote
Old 2008-09-18, 16:10   #44
nuggetprime
 
nuggetprime's Avatar
 
Mar 2007
Austria

1001011102 Posts
Default

The prev.code is totally broken. Sorry. Will attatch a new one probably tomorrow.

--Nuggetprime
nuggetprime is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone know enough about coding to do this? jrafanelli Software 2 2018-01-11 15:16
Python Coding Help? kelzo Programming 3 2016-11-27 05:16
Zhang's OPQBT coding help? flouran Programming 0 2009-07-25 02:43
coding midlet for TF starrynte Programming 1 2008-12-30 22:31
Coding Challenges R.D. Silverman Programming 18 2005-08-09 13:14

All times are UTC. The time now is 20:32.


Fri Jul 16 20:32:05 UTC 2021 up 49 days, 18:19, 1 user, load averages: 1.52, 1.90, 2.04

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.