The Museum of HP Calculators

HP Forum Archive 14

 Imaginary numbers in 33S equation modeMessage #1 Posted by RB on 11 Nov 2004, 3:18 a.m. Hi. I'm trying to put an equation in my 33S involving complex numbers, but there's no apparent way to enter i. For example, how would I enter the equation y=x+i in my 33S (i being the unit imaginary)? Thanks

 Re: Imaginary numbers in 33S equation modeMessage #2 Posted by Mike H on 11 Nov 2004, 10:40 a.m.,in response to message #1 by RB The 33 uses the expression Z=X+Yi for complex numbers. Like you I could not use the CMPX function in an equation. It did work when I wrote a program however. From the learning module on Complex numbers the following example is given: (3+2i)/(4-4i) The answer is 0.125 + 0.625i. Programming the 33S as follows C001 LBL C C002 RCL A C003 Enter C004 RCL B C005 Enter C006 RCL C C007 Enter C008 RCL D C009 CMPLX/ Store 3 in A Store 2 in B Store -4 in C Store 4 in D R/S results 0.6250 0.1250 I am no programmer, so I am sure there are better ways to express the program, but at least will allow you to enter imaginary parts into an equation. Mike Edited: 11 Nov 2004, 10:42 a.m.

 Are those ENTERs necessary?Message #3 Posted by John on 11 Nov 2004, 10:43 a.m.,in response to message #2 by Mike H I thought that RCL A RCL B RCL C RCL D would fill the stack with 4 numbers. Does the 33S require ENTER between those in a program?

 no, they are not (NT)Message #4 Posted by Mike H on 11 Nov 2004, 10:53 a.m.,in response to message #3 by John -

 Imaginary numbers in 33S equation modeMessage #5 Posted by RB on 12 Nov 2004, 2:57 p.m.,in response to message #2 by Mike H Thanks for the reply. I was actually trying to use complex numbers in the equation mode (where you input an equation and it solves for a variable), but I'm glad I can at least write programs with complex support. Thanks.

 Re: Imaginary numbers in 33S equation modeMessage #6 Posted by Eddie Shore on 11 Nov 2004, 10:42 a.m.,in response to message #1 by RB Unfortunately, equations on the HP33s does not support complex numbers. The i is used as an indirection variable rather than SQRT(-1).

 Imaginary numbers in 33S equation modeMessage #7 Posted by RB on 12 Nov 2004, 2:56 p.m.,in response to message #6 by Eddie Shore Thats terrible! I finally find a good use for equation mode, and it can't do what I want! Complex support really seem to be lacking on the 33S, I'm actually regretting buying it now. Thanks.

 Re: Imaginary numbers in 33S equation modeMessage #8 Posted by Tony Aponick on 16 Nov 2004, 5:06 a.m.,in response to message #7 by RB Just out of curiosity, what is the equation you want to solve with complex numbers?? Often if you just plug in (a + ib) into the equation, you can solve the real and imaginary parts separately. These separated equations *can* be solved numerically on the calculator

 Imaginary numbers in 33S equation modeMessage #9 Posted by RB on 16 Nov 2004, 10:59 p.m.,in response to message #8 by Tony Aponick The equation was sqrt[(R + jwL)/(G + jwc)]. It was tedious to retype this equations for various values. I know it would be simple to seperate it into real and imaginary parts, but I figured the equation mode could handle it.

 Using HP-33S SOLVE with complex numbersMessage #10 Posted by Karl Schneider on 17 Nov 2004, 3:45 a.m.,in response to message #9 by RB Quote: The equation [to be used in an equation for solving] was "sqrt[(R + jwL)/(G + jwc)]." This expression can be used within a program fed to the SOLVE function, which will solve for only one real-valued variable at a time: ``` x y z t RCL L RCL W * RCL R RCL C RCL W * RCL G G wC R wL CMPLX/ 0 ENTER 0.5 CMPLXyx ``` This will place Re {sqrt[(R + jwL)/(G + jwc)]} in the x-register and Im {sqrt[(R + jwL)/(G + jwc)]} in the y-register. Taking to the 0.5 power is the only workaround for finding square roots of complex-valued arguments. -- KS Edited: 17 Nov 2004, 3:46 a.m.

Go back to the main exhibit hall