Fast Fourier transform: Difference between revisions

→‎{{header|Go}}: library name update
(→‎{{header|Go}}: library name update)
Line 254:
"fmt"
"math"
"cmathmath/cmplx"
)
 
Line 265:
ditfft2(x[s:], y[n/2:], n/2, 2*s)
for k := 0; k < n/2; k++ {
tf := cmathcmplx.Rect(1, -2*math.Pi*float64(k)/float64(n)) * y[k+n/2]
y[k], y[k+n/2] = y[k]+tf, y[k]-tf
}
Line 289:
( 1.0000 +2.4142i)
</pre>
 
 
=={{header|Haskell}}==
1,707

edits