fft documentation
08-24-2017, 05:46 AM
Post: #1
 webmasterpdx Senior Member Posts: 541 Joined: Sep 2015
fft documentation
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, 06:42 AM
Post: #2
 Joe Horn Senior Member Posts: 1,631 Joined: Dec 2013
RE: fft documentation
(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!

<0|ΙΈ|0>
-Joe-
08-24-2017, 06:45 AM
Post: #3
 webmasterpdx Senior Member Posts: 541 Joined: Sep 2015
RE: fft documentation
I don't understand what is meant by a being the nth root of 1.....can you expound?
08-24-2017, 06:48 AM
Post: #4
 webmasterpdx Senior Member Posts: 541 Joined: Sep 2015
RE: fft documentation
....or better yet, give an example of doing an fft using these other arguments.
08-24-2017, 07:02 AM
Post: #5
 parisse Senior Member Posts: 1,112 Joined: Dec 2013
RE: fft documentation
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);
08-24-2017, 11:34 PM (This post was last modified: 08-24-2017 11:35 PM by webmasterpdx.)
Post: #6
 webmasterpdx Senior Member Posts: 541 Joined: Sep 2015
RE: fft documentation
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
 « Next Oldest | Next Newest »

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