Fast Fourier transform: Difference between revisions

Content added Content deleted
m (UFCS == win?)
m (got rid of the conv)
Line 360: Line 360:


D2 v2.060
D2 v2.060
<lang D>import std.stdio, std.math, std.algorithm, std.range, std.complex, std.conv;
<lang D>import std.stdio, std.math, std.algorithm, std.range, std.complex;


auto fft(Complex!real[] x)
auto fft(Complex!real[] x)
{
{
int N = to!int(x.length);
ulong N = x.length;
if (N <= 1) { return x; }
if (N <= 1) { return x; }
auto ev = stride(x, 2).array.fft;
auto ev = stride(x, 2).array.fft;