Fast Fourier transform: Difference between revisions

(PL/I version added)
Line 546:
fft: 0.000 0.000 0.000 8.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 8.000 0.000 0.000</lang>
 
Note that sprintf does not support complex arguments, so we must only display the magnitude of the fft here.
 
Note that we can clean up the result, removing the unnecessary least significant bit inaccuracy, without using sprintf, but using (**+)&.+. instead (this mechanism should probably be attributed Cliff Rieter).
 
<lang j> (**+)&.+. (,: |@fft) 1 o. 2p1*3r16 * i.16
0 0.92388 0.707107 0.382683 1 0.382683 0.707107 0.92388 0 0.92388 0.707107 0.382683 1 0.382683 0.707107 0.92388
0 0 0 8 0 0 0 0 0 0 0 0 0 8 0 0</lang>
 
...and when expressed this way, we see that the complex elements are all zeros.
 
Here is a representation of an example which appears in some of the other implementations, here:
6,962

edits