File:  [CSRG BSD Unix] / 43BSD / contrib / apl / lib / fftws
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:54 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

n��*.KB�	H	fftx{ fft z ;n;n2;mk;bitrev;i2;arg;cs;t;i1
 n{1YRz
 x{z
 n2{n%2
 bitrev { 2B O-((2O*n)R2)NIn
loop: mk{(n2R1),n2R0
 i2 { n2+i1 { (nRmk)/In
 arg { bitrev[Di1%n2]%n
 cs { O\ 2 1 J.O 2XO arg
 t { x[i2; 0 1 1 0]Xcs,cs
 t { (t[;,0]+t[;,1]),t[;,2]-t[;,3]
 x[i2;] { x[i1;]-t
 x[i1;] { x[i1;]+t
 }(1$n2 { n2%2)/loop
 x { x[bitrev;]
aX�@n�An2@mk$�@i2$�@@Ai1$Aarg$�?bitrev4A�@@Acs8�@���˙���@t8AiD	rampr { ramp steps
r { (O|Isteps +1),1UIsteps
rmp��A@AA�@�@A@A	timetime prog; FtiFm
FtiFm { NB21
E prog
L { ''
L { 'execution time is',(,B (.01XS((BN21)-FtiFm)%.6)), ' secs.'
''
		magphaseresult { magphase y ;atans;phase;real0
real0 { y[;0]=0
atans { `3Oy[;1]%real0 +y[;0]
phase { (~real0 )X((Oy[;0]<0)XXy[;1])+ atans
phase { phase +0.5XO real0 XXy[;1]
result { O\(O|Ry)R((+/yXy)*0.5),phase

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.