HP Forums

Full Version: fft documentation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
(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!
I don't understand what is meant by a being the nth root of 1.....can you expound?
....or better yet, give an example of doing an fft using these other arguments.
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);
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
Reference URL's