HP Forums
fft documentation - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: fft documentation (/thread-8888.html)



fft documentation - webmasterpdx - 08-24-2017 05:46 AM

The fft is described as fft(v) and fft(v,a,p), but the version with more than one argument doesn't have the other arguments explained. Can someone please supply that description?
Thx


RE: fft documentation - Joe Horn - 08-24-2017 06:42 AM

(08-24-2017 05:46 AM)webmasterpdx Wrote:  The fft is described as fft(v) and fft(v,a,p), but the version with more than one argument doesn't have the other arguments explained. Can someone please supply that description?
Thx

The current User Guide say this:

"With two additional integer arguments a and p, returns the discrete Fourier transform in the field Z/pZ, with a as primitive nth root of 1 (n=size(Vector))."

The built-in Help system says almost the same thing but it is missing the word "as", which makes the above confusing. Hope this helps!


RE: fft documentation - webmasterpdx - 08-24-2017 06:45 AM

I don't understand what is meant by a being the nth root of 1.....can you expound?


RE: fft documentation - webmasterpdx - 08-24-2017 06:48 AM

....or better yet, give an example of doing an fft using these other arguments.


RE: fft documentation - parisse - 08-24-2017 07:02 AM

Let p:=35969;isprime(p); a prime number.
ifactor(p-1); a:=22798;powmod(a,(p-1)/2,p); powmod(a,(p-1)/281,p);
a is therefore a primitive root of 1 mod p.
Take a random vector (modulo p) v:=randvector(128,100);
w:=fft(v,a,p); ifft(w,a,p);


RE: fft documentation - webmasterpdx - 08-24-2017 11:34 PM

Thank you....that makes a lot more sense. BTW, it might be an idea to add documentation for the randvector function somewhere.... It's in xcas documentation, but nowhere in the prime documentation.
Thx
-D