Fast Fourier transform: Difference between revisions

Content deleted Content added
Updated D version
Since there's already a more efficient FFT built in, I didn't reinvent the wheel.
Line 223:
 
Note that sprintf does not support complex arguments, so we only display the magnitude of the fft here.
 
=={{header|Mathematica}}==
Mathematica has a built-in FFT function which uses a proprietary algorithm developed at Wolfram Research. It also has an option to tune the algorithm for specific applications. The options shown below, while not default, produce output that is consistent with most other FFT routines.
 
<lang Mathematica>
Fourier[{1,1,1,1,0,0,0,0}, FourierParameters->{1,-1}]
</lang>
 
Output: <pre>{4. + 0. I, 1. - 2.4142136 I, 0. + 0. I, 1. - 0.41421356 I, 0. + 0. I, 1. + 0.41421356 I, 0. + 0. I, 1. + 2.4142136 I}</pre>
 
=={{header|Perl 6}}==