Question for the HP guys....
10-08-2017, 11:37 PM
Post: #1
 webmasterpdx Senior Member Posts: 533 Joined: Sep 2015
Question for the HP guys....
I remember from back in my supercomputer days, the FFT algorithm was pretty important in the field I worked in, and there were generally 2 ways to implement it. The first used bit-reverse and radix-2 transform, while the second used digit-reverse and radix-4 transform. Radix-4 was quite a bit faster in implementation, so what I'm wondering is which is the version of the FFT function on the HP Prime, radix-2 or radix-4 ?????????
Thanks
-Donald
10-09-2017, 12:03 AM
Post: #2
 Tim Wessman Senior Member Posts: 1,753 Joined: Dec 2013
RE: Question for the HP guys....
https://www-fourier.ujf-grenoble.fr/~par...mpile.html

You'll be able to find it just as fast I think. Download the source, search for "fft" and you'll probably find it. Bernard might chime in.

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
10-09-2017, 12:30 AM
Post: #3
 Mark Hardman Senior Member Posts: 443 Joined: Dec 2013
RE: Question for the HP guys....
(10-09-2017 12:03 AM)Tim Wessman Wrote:  Download the source, search for "fft" and you'll probably find it. Bernard might chime in.

https://www-fourier.ujf-grenoble.fr/~par...modpoly.cc

Around line 3171:

Code:
  // Fast Fourier Transform, f the poly sum_{j<n} f_j x^j,    // and w=[1,omega,...,omega^[m-1]] with m a multiple of n (m=step*n)   // return [f(1),f(omega),...,f(omega^[n-1]) [it's indeed n, not m]   // WARNING f is given in ascending power   void fft(const modpoly & f,const modpoly & w ,modpoly & res,environment * env){

Ceci n'est pas une signature.
10-09-2017, 04:25 AM
Post: #4
 webmasterpdx Senior Member Posts: 533 Joined: Sep 2015
RE: Question for the HP guys....
I looked through the source code and from what I can tell, in maple.cc, if HP uses gcc and libgsl (Gnu Scientific Library), then they call the radix2 transform function.
Anyway, radix 4 speed increases are only significant when a large number of data elements are being used and since we are talking about a calculator, it's doubtful if large numbers of data elements are going to be used in fft's. Thus the advantage of a radix-4 would be minimal in any case.
Good 'nuff... :-)
Thx
-Donald
10-10-2017, 09:09 AM
Post: #5
 parisse Senior Member Posts: 810 Joined: Dec 2013
RE: Question for the HP guys....
The GSL is not active when giac is compiled for the Prime.
There are two main FFT implementations, one for complex<double> data, and one for modular integers. The first one has prototype
Code:
void fft(std::complex<double> * f,int n,const std::complex<double> * w,int m,complex< double> * t)
it first checks if the size is even, if it is odd it tries to find a factor, if not it applies slow FFT. For even size, there is no special code if n is divisible by 4. The implementation for complex<double> is not fully optimized (the integer modular fft is more optimized).
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)