![]() |
|
|
#45 | |
|
∂2ω=0
Sep 2002
República de California
103·113 Posts |
Quote:
Until you teach yourself the rudiments of the FFT and actually code one up and then write at least an old-style LL test around it which zero-pads the inputs [i.e. doesn't require the DWT], there's no point whatsoever in asking the experts to look at your code - YOU'RE the one who needs to look at your code, unless you've got some highly specific coding or build issue you need advice on. |
|
|
|
|
|
|
#46 |
|
Mar 2007
Austria
2×151 Posts |
You are completely right Ernst.And it's hard to insult me, so don't worry
![]() I found a page on the web telling me for FFT i don't have to break off 1 time, but so many times that fftlen=2 and then recombine. That is the point I've forgotten. Thanks, nuggetprime |
|
|
|
|
|
#47 |
|
Mar 2007
Austria
2×151 Posts |
I've now managed to code an FFT out of my DFT. It takes me ~0.5 seconds to do a length 8192-fft(with IFFT ~1 second). Still a very bad time. I don't ask to look at my code,but what is important to get normal speeds(at least ~0.3 ms/fft). That's a factor of 3000, so I'm sure I'm doing something pretty wrong. If I get asked, I can also post the code.
thanks, nuggetprime Last fiddled with by nuggetprime on 2008-09-24 at 12:11 |
|
|
|
|
|
#48 | |
|
∂2ω=0
Sep 2002
República de California
103·113 Posts |
Quote:
|
|
|
|
|
|
|
#49 |
|
Mar 2007
Austria
2×151 Posts |
I got(probably) the right code. It's less than 50 lines, so i could probably understand it. But how to use it?(small example).
Thanks, nugget |
|
|
|
|
|
#50 |
|
∂2ω=0
Sep 2002
República de California
101101011101112 Posts |
Specifically, you want the section titled "FFT of Single Real Function", i.e. the realft() code, and the functions called by that. That allows you to do both forward and inverse FFTs, so the general outline for a non-DWT-based LL test using this is;
0. Set a reasonable wordsize for DP-based arithmetic, say w = 16 bits per word. 1. Pick your real-double residue vector length. For a Mersenne exponent p and a power-of-2-length FFT implementation, this will be n = 2*2^ceiling[log2(p/w)], e.g. for p = 607 and w = 16, this gives n = 2*2^6 = 128. The leading multiply-by-2 here is to effect the zero-padding required by a non-DWT method. 2. Initialize your residue vector to have 4 in the lowest-order slot and zeros elsewhere. 3. Do a forward real-vector FFT. 4. Do a dyadic (a.k.a. pointwise) squaring of the forward FFT outputs 5. Do an inverse real-vector FFT. 6. Normalize the outputs of (5) by dividing each [call it xi] by w, carrying y = nint(xi/w) into xi+1, and replacing xi with w*[xi - y)]. Add any carry out of the highest-order vector element back into x0 and also subtract 2 form x0. 7. Perform steps 3-6 precisely (p-2) times. If the result is the zero vector, 2p-1 is prime, otherwise it's composite. Last fiddled with by ewmayer on 2008-09-24 at 18:09 |
|
|
|
|
|
#51 |
|
Mar 2007
Austria
2×151 Posts |
After some time, I finally got a FFT working that's about 3 times as slow as gwnum.
I can understand the split-radix fft, but not how a real-data fft works. I've not found any explanatory material except of hard-to-read code. Can you please provide an explanation and a small example? Thanks, --nuggetprime |
|
|
|
|
|
#52 |
|
"Richard B. Woods"
Aug 2002
Wisconsin USA
22×3×641 Posts |
So, you need more explanation and example than the "FFT explanation for non math guys" thread provides?
Last fiddled with by cheesehead on 2008-10-23 at 21:40 |
|
|
|
|
|
#53 |
|
Mar 2007
Austria
2×151 Posts |
|
|
|
|
|
|
#54 | |
|
∂2ω=0
Sep 2002
República de California
103·113 Posts |
Quote:
Last fiddled with by ewmayer on 2008-10-24 at 18:14 |
|
|
|
|
|
|
#55 | |
|
"Richard B. Woods"
Aug 2002
Wisconsin USA
22·3·641 Posts |
Quote:
Last fiddled with by cheesehead on 2008-10-25 at 17:38 |
|
|
|
|
![]() |
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 |