Help please? 20S->35S - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: Help please? 20S->35S (/thread-4860.html) Help please? 20S->35S - Tim Wessman - 10-02-2015 02:49 PM 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 RE: Help please? 20S->35S - Dave Britten - 10-02-2015 05:39 PM 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``` RE: Help please? 20S->35S - Thomas Klemm - 10-02-2015 06:13 PM 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 RE: Help please? 20S->35S - Tim Wessman - 10-02-2015 07:30 PM 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