HP32S/SII micro challenge



#2

I sometimes use my HP32S for simple calculations on complex numbers, thanks to the CMPLXxxx functions. However, I always regret the lack of CMPLXx<>y, CMPLXenter and CMPLXx^2. CMPLXx<>y can be easily done with RDN RDN (here, RDN means "R-Down-Arrow"). CMPLXx^2 could be done with CMPLXenter CMPLX*, if CMPLXenter was only existing.

Are you able to find a simple sequence that simulate CMPLXenter? (I mean a sequence which duplicates the complex number in x,y to z,t)

I just found a simple way after years of research (I'm hardly joking ...). So I'm curious to know if some of you are more clever than I was to find a solution.

I will post my solution in a few days.


#3

>Are you able to find a simple sequence that simulate CMPLXenter? (I mean a sequence which duplicates the complex number in x,y to z,t)

OK,

I'll start the ball rolling. I'm sure there are better ways, but I came up with
this sequence without any thought of minimizing steps. So, consider this a starting point:

KEYSTROKES:     REGISTER CONTENTS:
----------- ------------------
<enter> x,x,y,z
<enter> x,x,x,y
- 0,x,y,y
X<>Y x,0,y,y
Rv (roll down) 0,y,y,x
+ y,y,x,x
Rv y,x,x,y
X<>Y x,y,x,y
NOTE: I didn't actually try this---so I hope there aren't any mistakes! :-)

Bruce.
#4

> Are you able to find a simple sequence that simulate CMPLXenter?

Is this the one?

0

1

CMPLX*


#5

This is also simple, and it involves only
ENTER, and stack manipulation.

x y ? ?
ENTER
x x y ?
Rv Rv
Y ? x x
ENTER
y y ? x
R^
x y y ?
ENTER
x x y y
R^
y x x y
x <-> Y
x y x y

So: ENTER Rv Rv ENTER R^ ENTER R^ X<->Y

which in total is 8 steps. I think it's nice that it
only uses stack manipulation commands (i.e. no arithmetic).

A nicer sequence, that contains the minimum number
of ENTER, is:

ENTER R^ R^ X<->Y Rv ENTER Rv X<->Y

which is also 8 steps.

Can anyone do better, or prove that it cannot be done better, with only R^, Rv, CLX, ENTER, X<->Y?

Luca


#6

>Can anyone do better, or prove that it cannot be done >better, with only R^, Rv, CLX, ENTER, X<->Y?

Try this:

Enter
Enter
R^
Enter
Rv
X<>Y

Just six steps. :)

Regards.

#7

>Can anyone do better, or prove that it cannot be done >better, with only R^, Rv, CLX, ENTER, X<->Y?

Other than the previous, I found the following
solutions too:

Enter
Enter
CLx
+
R^
X<>Y


Enter
R^
CLx
+
R^
X<>Y

I wasn't able to use less than six steps...

IMHO, the HP15C handles complex numbers calculations
better than the HP32SII.

Regards.

#8

Congratulation Paul!

My solution was: 0 ENTER CMPLX+

I'm amazed how easily you found it ...

Jean-Francois

#9

CMPLXx^2:

0
ENTER
2
CMPLX y^x


Possibly Related Threads...
Thread Author Replies Views Last Post
  Micro Voyagers Matt Agajanian 11 441 08-26-2013, 05:11 PM
Last Post: Stephan Matthys
  [WP-34S] Micro projector ever? Chris Tvergard 6 230 06-01-2012, 09:21 AM
Last Post: Chris Tvergard
  HP32s Relative GTO Mike T. 4 120 04-04-2011, 07:33 PM
Last Post: Don Shepherd
  i41CX+ gets another plus (CAS with editor) [micro review] Egan Ford 4 200 03-18-2010, 12:05 AM
Last Post: Eddie W. Shore
  Will a micro sd card fit Hp 50g? ferroburak 6 249 11-24-2009, 10:17 AM
Last Post: Brian Walsh
  1984 micro comp catalog Mike Reed 0 61 10-23-2008, 11:14 AM
Last Post: mike reed
  MICRO SD CARDS IN HP 50G?? Mike Reed 10 364 02-22-2008, 06:04 PM
Last Post: Mike Reed
  RE: 35s sorting routine challenge - Gene's Challenge Miguel Toro 4 212 08-01-2007, 08:36 AM
Last Post: Miguel Toro
  micro focus object with HP-UX 11i TIIB 1 85 01-04-2005, 11:16 AM
Last Post: Ron Ross
  HP32S 50th edition? John 4 189 09-02-2004, 03:34 AM
Last Post: Randy Smith

Forum Jump: