Post Reply 
50g System RPL list processing
06-18-2014, 02:42 AM (This post was last modified: 06-18-2014 02:44 AM by Jacob Wall.)
Post: #1
50g System RPL list processing
In another thread a bit of discussion on code which indirectly involves list processing got me to thinking about how I had implemented my own custom System RPL operations for some specific tasks. NOTE: Used within a library so no type checking included.

1. Instead of ΣLIST, for a list of reals I have a very simple substitution:
Code:
::
  INNERCOMP
  ZERO
  #=casedrop
  %0
  DUP#1=
  caseDROP
  ONE_DO (DO)
  %+
  LOOP
;

2. Multiply corresponding elements of reals in two lists, instead of x*, for example
{ 1. 2. 3. } { 4. 5. 6. } x* = { 4. 10. 18. }

Code:
::
  INNERCOMP
  get1
  INNERCOMP
  get1
  2DUP#=
  NOT
  OVER#0=
  ORcase
  ::
    OVER#2+UNROL
    {}N
    OVER#2+UNROL
    {}N
  ;
  #1+_ONE_DO (DO)
  get1
  INDEX@
  #2+ROLL
  %*
  INDEX@
  #1+UNROLL
  LOOP
  {}N
;

Wondering if anyone had done similar implementations, and if so I'd be curious to compare.

Jacob
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
50g System RPL list processing - Jacob Wall - 06-18-2014 02:42 AM
RE: 50g System RPL list processing - ttw - 06-21-2014, 02:13 AM
RE: 50g System RPL list processing - Han - 10-28-2014, 05:06 PM
RE: 50g System RPL list processing - Han - 10-31-2014, 02:15 PM
RE: 50g System RPL list processing - Han - 11-01-2014, 08:34 PM
RE: 50g System RPL list processing - Han - 11-02-2014, 01:04 AM
RE: 50g System RPL list processing - Han - 11-01-2014, 08:31 PM
RE: 50g System RPL list processing - Han - 11-02-2014, 06:26 PM



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