The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

HP 35s polar/rectangular conversion
Message #1 Posted by CD Dodds on 28 Nov 2013, 12:25 p.m.

When you do rectangular/polar conversion you enter it as a complex number and change the display format according to what you want to see. Is there a way to separate the angle from the vector, or the "x" coordinate from the "y" coordinate? Like retrieving the fraction part or integer part from a number.

      
Re: HP 35s polar/rectangular conversion
Message #2 Posted by Michael de Estrada on 28 Nov 2013, 12:30 p.m.,
in response to message #1 by CD Dodds

Buy a used 33s or 32SII. Problem solved.

      
Re: HP 35s polar/rectangular conversion
Message #3 Posted by Dieter on 28 Nov 2013, 12:44 p.m.,
in response to message #1 by CD Dodds

The 35s has no commands to split a complex number into its real and imaginary part. However, polar coordinates are easy:

Convert (3; 4) to polar coordinates

  3 i 4
  [DISPLAY] .0   =>  5,0000 (theta) 53,1301
or the other way (polar to rectangular)
  5 (theta) 53,1301
  [DISPLAY]  9   =>  3,0000 i 4,0000
Both display options represent the same number.
To obtain distance and angle (in either display mode):
  [ABS]          =>  5,0000   ' distance
  LastX [ARG]    => 53,1301   ' angle
Getting the rectangular coordinates 3 and 4 from this is a bit tricky, though. ;-)

Dieter

Edited: 28 Nov 2013, 12:50 p.m.

            
Re: HP 35s polar/rectangular conversion
Message #4 Posted by CD Dodds on 28 Nov 2013, 1:56 p.m.,
in response to message #3 by Dieter

I have a 32sII and it has always been one of my favorites. Have a 33s it works but never got attached to it. I am helping teach a "land surveyor in training" course at the annual state survey convention and we need to use calculators that are allowed on the Federal Land Surveyor in Training test. I do like the 35s and I like it even better now.

Thank you Dieter for your help. It's much appreciated.

Chad

      
Re: HP 35s polar/rectangular conversion
Message #5 Posted by R. Pienne on 28 Nov 2013, 2:08 p.m.,
in response to message #1 by CD Dodds

For rectangular coordinates, you can use the following programs:

Real: LBL R ABS LASTx ARG COS x RTN

Imaginary: LBL I ABS LASTx ARG SIN x RTN

            
Re: HP 35s polar/rectangular conversion
Message #6 Posted by CD Dodds on 28 Nov 2013, 2:25 p.m.,
in response to message #5 by R. Pienne

I think I can combine these into one program so you're left with the x and y coordinates on two levels of the stack just like the 32sII did when you did the conversion.

Thanks Chad

                  
Re: HP 35s polar/rectangular conversion
Message #7 Posted by Dieter on 28 Nov 2013, 2:39 p.m.,
in response to message #6 by CD Dodds

This kind of solution was discussed in detail as soon as the community realized that there are no traditional P<>R commands on the 35s. Some routines (that even preserve the stack) can be found in this discussion from 2007.

A summary of all efforts, with optimized solutions, can be found in the articles section on this website. Here, even the state of flag 10 is preserved.

Dieter


[ Return to Index | Top of Index ]

Go back to the main exhibit hall