File:  [gforth] / gforth / fft-bench.fs
Revision 1.5: download - view: text, annotated - select for diffs
Mon Oct 8 23:12:50 2012 UTC (6 years, 10 months ago) by pazsan
Branches: MAIN
CVS tags: HEAD
FFT selftest

    1: \ fft based floating point benchmark
    2: 
    3: require fft.fs
    4: 
    5: : >values ( -- ) #points 0 ?DO  I $55 and s>f I $AA and s>f I values z!  LOOP ;
    6: 
    7: : setup ( -- ) 32 1024 * points >values ;
    8: 
    9: : main setup fft rfft normalize ;
   10: 
   11: Variable pass
   12: : test ( -- )  main pass on
   13:     #points 0 ?DO
   14: 	i values z@ fround f>s fround f>s
   15: 	I $aa and I $55 and d<> IF i . i values z@ z. cr pass off THEN
   16:     LOOP  pass @ IF ." passed test" cr THEN ;

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