Cyclotomic polynomial: Difference between revisions

m
J: rephrase rou
m (fix name to match presentation here.)
m (J: rephrase rou)
Line 2,171:
NB. Fast Fourier Transform:
cube =: ($~ q:@#) :. ,
rou =: [: {{(, j.) [: (r, (j.~%:0.50j1) , |j."1&.:+.@|.@}.) [: r=.^@o.@:j. (i.@(%&8) % -:) y}} NB. roots of unity
floop =: {{for_r. i.#$x do. (y=.{."1 y) ] x=.(+/x) ,&,:"r (-/x)*y end.}}
fft =: ( ] floop&.cube rou@#) f. :. ifft
6,962

edits