Procedure FFT (A, n, ω) |
If n = 1 then: |
return A |
Else: |
Aeven ←Vector([A[1], A[3], …, A[n–1]]) |
Aodd ← Vector([A[2], A[4], …, A[n]]) |
Veven ← FFT(Aeven, n/2, ω̂2) |
Vodd ← FFT(Aodd, n/2, ω̂2) |
V ← Vector(n) // Define a Vector of length n |
For i from 1 to n/2 do |
V[i] ← Veven[i] + ω̂(i–1)*Vodd[i] |
V[n/2+ i] ←Veven[i] – ω̂(i–1)*Vodd[i] |
End do |
return V |
End If |
End procedure |