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

\ fft based floating point benchmark

require fft.fs

: >values ( -- ) #points 0 ?DO  I $55 and s>f I $AA and s>f I values z!  LOOP ;

: setup ( -- ) 32 1024 * points >values ;

: main setup fft rfft normalize ;

Variable pass
: test ( -- )  main pass on
    #points 0 ?DO
	i values z@ fround f>s fround f>s
	I $aa and I $55 and d<> IF i . i values z@ z. cr pass off THEN
    LOOP  pass @ IF ." passed test" cr THEN ;

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