HP Forums

You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Had an unusual support request come in today. An elderly gentleman wrote a program for his 20S a long time ago and the unit recently died. He got a 35s which he seems happy with, but isn't sure how to translate "his program" to it...

I'd be appreciative if someone could aid. I am not knowledgeable enough about the 20S to be much help... :-(

Of the top of my head I'd guess it is a polar/rect conversion thing???

Many thanks.

Quote:PRGM
LBL A
1
Input
RCL 2
R->
Swap
Input
RCL1
R->
Swap
Input
RCL2
Sin
P<-
+
RCLO
=
R->
Swap
Input
RCL2
Cos
X
RCL1
Sin
P<-
Swap
Acos
RTN
Prgm

Sto 0 ….
Sto 1 …
Sto 2…
XEG

Lab A 1. Result
Swap 2. Result
It appears to be doing something like this.

A couple of notes:

- This is 32S code. The 35S doesn't have proper rectangular/polar conversion functions.
- Registers 0, 1, and 2 have been replaced with A, B, and C respectively.
- I'm making the assumption that "R->" and "P<-" are referring to "RShift, ->R" and "LShift, ->P", the to-rectangular and to-polar conversion functions.
- Without any test cases, I can't be certain that this is actually working as intended (I don't have my 20S with me at the moment to feed arbitrary figures into and compare results).
- The 20S takes its arguments in the order x, y or r, θ (and returns them in that order, with y or θ in the display). Thus I may have messed up a swap somewhere.

Code:
```LBL A RCL C 1 θ,r->y,x RCL B x<>y θ,r->y,x RCL C SIN x<>y y,x->θ,r x<>y RCL A + x<>y θ,r->y,x RCL C COS RCL B SIN * x<>y y,x->θ,r ACOS RTN```
I'll give it a try though I could be completely wrong:

Code:
```COS(C)*COS(B)+i*SIN(C) ABS LASTx ARG RCL+ A REGY*COS(REGX)+i*COS(C)*COS(B) ARG LASTx ABS ACOS```

As with Dave's program for the HP-32S the registers A, B and C are used.

Example:
30 STO A
40 STO B
50 STO C
R/S

84.96
60.38

Does this make sense?

Cheers
Thomas
Thanks. It does make sense. I will pass it on to the gentleman and see if it helps. Much appreciated!

Maybe someone should have put r<=>p conversions into the 35s... :-P
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :