Diff for /gforth/fft.fs between versions 1.2 and 1.5

version 1.2, 2005/12/31 15:46:08 version 1.5, 2007/12/31 17:34:58
Line 1 Line 1
 \ fast fourier transform  \ fast fourier transform
   
 \ Copyright (C) 2005 Free Software Foundation, Inc.  \ Copyright (C) 2005,2007 Free Software Foundation, Inc.
   
 \ This file is part of Gforth.  \ This file is part of Gforth.
   
Line 70  Carray expix Line 70  Carray expix
   BEGIN  2dup >  WHILE  dup 2* swap fft-step    BEGIN  2dup >  WHILE  dup 2* swap fft-step
   REPEAT  2drop drop ;    REPEAT  2drop drop ;
   
 : normalize ( -- )  #points dup s>f 1/f  : fftscale ( r -- )
   0 DO  I values dup z@ 2 fpick zscale z!  LOOP  fdrop ;    #points 0 DO  I values dup z@ 2 fpick zscale z!  LOOP  fdrop ;
   : normalize ( -- )  #points s>f 1/f  fftscale ;
   
 : fft  ( -- )  #points  true (fft ;  : fft  ( -- )  #points  true (fft ;
 : rfft ( -- )  #points false (fft ;  : rfft ( -- )  #points false (fft ;
   
   : hamming ( -- )  #points 0 DO
           I values dup z@ pi I #points fm*/ fsin f**2 f2* zscale z!
       LOOP ;
   

Removed from v.1.2  
changed lines
  Added in v.1.5


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>