Post Reply 
FFT Multiplication (HP-48G/GX/G+)
02-14-2014, 12:07 AM
Post: #14
RE: FFT Multiplication (HP-48G/GX/G+)
(02-13-2014 01:16 AM)Raymond Del Tondo Wrote:  Hi, I just made a non-optimized SysRPL version derived from your previous prog version, which runs the above arrays in about 67 seconds on a normal HP 48GX.

There's _much_ room for streamlining, which I may do tomorrow;-)

Cheers

Raymond

Hello Raymond,

You might want to try the latest UserRPL version:

Code:

%%HP: T(3)A(D)F(,);
\<< DUP2 SIZE OBJ\->
DROP SWAP SIZE OBJ\->
DROP DUP2 MAX ROT
ROT + 4 ROLLD LN 2
LN / DUP FP NOT NOT
SWAP IP + 2 SWAP ^
DUP + DUP ROT SWAP
1 \->LIST RDM ROT ROT
1 \->LIST RDM FFT
OBJ\-> 1 GET \->LIST
SWAP FFT OBJ\-> 1 GET
\->LIST
  \<< *
  \>> DOLIST OBJ\-> 1
\->LIST \->ARRY IFFT 1
ROT SUB RE 0 RND
DUP SIZE OBJ\-> DROP
1 - 1
  FOR i i GETI
10000 MOD 3 PICK
ROT DUP ROT ROT GET
ROT + PUT i GETI
10000 / IP 3 PICK
ROT GET 10000 / IP +
i SWAP PUTI OVER
OVER GET 10000 MOD
PUT -1
  STEP
\>>

It does the same in about 52 seconds, timed with this program:

Code:

%%HP: T(3)A(D)F(,);
\<< TICKS ROT ROT
FFTM TICKS ROT -
B\->R 8192 /
\>>

The previous version took about 175 seconds. No significant gain on the hp 50g with this new version, though (29 s --> 26.5 s).

Code:

%%HP: T(3)A(D)F(.);
\<< DUP2 SIZE OBJ\-> DROP SWAP SIZE OBJ\-> DROP DUP2 MAX UNROT + 4. ROLLD LN 2. LN / DUP FP NOT NOT SWAP IP + 2. SWAP ^ DUP + DUP ROT SWAP 1. \->LIST RDM UNROT 1. \->LIST RDM FFT SWAP FFT HADAMARD IFFT 1. ROT SUB RE 0. RND DUP SIZE OBJ\-> DROP 1. - 1.
  FOR i i GETI 10000. MOD PICK3 ROT DUP UNROT GET ROT + PUT i GETI 10000. / IP PICK3 ROT GET 10000. / IP + i SWAP PUTI OVER OVER GET 10000. MOD PUT -1.
  STEP
\>>

Thanks for you suggestions and advice!

Gerson.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: FFT Multiplication (HP-48G/GX/G+) - Gerson W. Barbosa - 02-14-2014 12:07 AM



User(s) browsing this thread: 2 Guest(s)