Fast Fourier transform: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: changed the way REXX sets NUMERIC DIGITS (based on "size" of pi). -- ~~~~)
m (→‎{{header|REXX}}: changed comment about the pi function result (used as a maximal value for DIGITS). -- ~~~~)
Line 1,102: Line 1,102:
<br>This is called zero-padding.
<br>This is called zero-padding.
<lang rexx>/*REXX pgm does a fast Fourier transform (FFT) on a set of complex nums.*/
<lang rexx>/*REXX pgm does a fast Fourier transform (FFT) on a set of complex nums.*/
numeric digits length( pi() ) - 1 /*limited by PI function returns.*/
numeric digits length( pi() ) - 1 /*limited by PI function result. */
arg data; if data='' then data='1 1 1 1 0' /*no data? Then use default*/
arg data; if data='' then data='1 1 1 1 0' /*no data? Then use default*/
data=translate(data, 'J', "I") /*allow use of i as well as j */
data=translate(data, 'J', "I") /*allow use of i as well as j */