Post Reply 
Quiet Week-end Challenge (49G?) - Closed
05-16-2015, 02:13 PM
Post: #14
RE: Quiet Week-end Challenge (49G?) - Closed
(05-16-2015 07:34 AM)Gerald H Wrote:  Here an HP 38G programme to produce the desired even & odd lists:

Store a list of four integers (pos, neg or zero, repetitions allowed) in L1 & actuate the programme, returning the two lists in L2 & L3.

O4SQE4SQ

4*L1+1►L2:
L1(2) ►B:
L1(3) ►C:
L1(4) ►D:
2*(L1(1)+{B+C+D+1,D-B-C,C-B-D,B-C-D})►L3:

HP 49G/50g version:

Code:

%%HP: T(3)A(R)F(.);
\<< 4. \->LIST DUP OBJ\-> DROP \-> a b c d
  \<< b c + d + 1. + d b - c - c b - d - b c - d - 4. \->LIST a NEG - 2. * SWAP 4. * -1. -
  \>>
\>>

0 0 0 0 --> {2. 0. 0. 0.} {1. 1. 1. 1.}
10000 1 1 -4321 --> {11364. 11354. 28642. 28642.} {40001. 5. 5. -17283.}
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Quiet Week-end Challenge (49G?) - nlj - 05-13-2015, 11:26 AM
RE: Quiet Week-end Challenge (49G?) - Closed - Gerson W. Barbosa - 05-16-2015 02:13 PM



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