The Complex Number Multi-Tool is a program for the HP 35S calculator which combines a few missing functions into one label.
- Convert rectangular to polar coordinates.
- Convert polar to rectangular coordinates.
- Get the real value.
- Get the imaginary value.
- Get the complex conjugate.
Run the program with with XEQ
, I
, and ENTER
. The menu will flash three messages with numbers one to five for the five tools. Enter your selection at the prompt.
- Convert rectangular to polar coordinates:
Input: A complex number stored in theX
register.
Output: x theta y, where the x-value is stored in theX
register, and the y-value is stored in theY
register. - Convert polar to rectangular coordinates:
Input: x theta y, where the x-value is stored in theX
register, and the y-value is stored in theY
register.
Output: A complex number stored in theX
register. - Get the real value:
Input: A complex number stored in theX
register.
Output: The real value stored in theX
register. - Get the imaginary value:
Input: A complex number stored in theX
register.
Output: The imaginary value stored in theX
register. - Get the complex conjugate:
Input: A complex number stored in theX
register.
Output: The complex conjugate stored in theX
register.
I001 LBL I
I002 SF 10 // Set Flag 10 to use EQN as text for menu
I003 EQN 1=POLAR 2=RECT
I004 PSE
I005 EQN 3=REAL 4=IMAG
I006 PSE
I007 EQN 5=COMPLEX CONJ
I008 PSE
I009 CF 10 // Return EQN to normal mode
I010 INPUT S // Prompt for user selection
I011 1
I012 X=Y? // Test if selection is Convert to Polar
I013 GTO I031
I014 Roll down // Enter the "Roll down" key
I015 2
I016 X=Y? // Test if selection is Convert to Rectangular
I017 GTO I038
I018 Roll down
I019 3
I020 X=Y? // Test if selection is Get Real Value
I021 GTO I045
I022 Roll down
I023 4
I024 X=Y? // Test if selection is Get Imaginary Value
I025 GTO I054
I026 RCL C
I027 5
I028 X=Y? // Test if selection is Complex Conjugate
I029 GTO I063
I030 RTN // Exit program if no suitable user choice entered
I031 Roll down // Start of Convert to Polar routine
I032 Roll down
I033 ENTER
I034 ARG
I035 LASTx
I036 ABS
I037 RTN // End of Convert to Polar routine
I038 EQN [REGZ*SIN(REGT),REGZ*COS(REGT)] // Start of Convert to Rectangular routine
I039 [1,0]
I040 x<>y
I041 *
I042 EQN LASTx*[0,1]
I043 EQN REGX+i*REGY // Enter "REGX" as four variables, R, E, G, X.
I044 RTN // End of Convert to Rectangular routine
I045 Roll down // Start of Get Real Value routine
I046 Roll down
I047 ENTER
I048 ARG
I049 COS
I050 x<>y
I051 ABS
I052 *
I053 RTN // End of Get Real Value routine
I054 Roll down // Start of Get Imaginary Value routine
I055 Roll down
I056 ENTER
I057 ARG
I058 SIN
I059 x<>y
I060 ABS
I061 *
I062 RTN // Start of Get Imaginary Value routine
I063 Roll down // Start of Complex Conjugate routine
I064 Roll down
I065 ENTER
I066 ABS
I067 x^2 // Enter the "X squared" key
I068 x<>y
I069 /
I070 RTN // End of Complex Conjugate routine
The following programs served as references:
- Paul Dale's polar and rectangular conversions.
- Antonio Maschio's complex number decomposition.
- Karl Schneider's complex conjugate conversion.
- PickyBart's single label curve fitting program for the menu system.
- Stefan Vorkoetter's Matrix Multi-Tool for the name and the idea to consolidate the tools.