Cuvee RPN67 & Complex mode

10132022, 09:27 PM
(This post was last modified: 10132022 09:27 PM by Matt Agajanian.)
Post: #1




Cuvee RPN67 & Complex mode
Hi all.
If you’re using RPN67, how do you use the g OP CPX MODE button? After I press 1 g OP CPX MODE, it seems complex mode should be set. But, when I operate two number functions (+, , x, /) with complex mode set this way, I get incorrect results. Please advise on how I use g OP CPX MODE correctly. Thank you. 

10142022, 02:45 PM
(This post was last modified: 10142022 03:52 PM by Nigel (UK).)
Post: #2




RE: Cuvee RPN67 & Complex mode
A brief explanation can be found here (search for CPLX on that page). In short, you can't enter complex numbers onto the stack while you are in complex mode! You have to leave complex mode first, enter the numbers, and then go into complex mode and press whatever buttons you like.
So to multiply (1+2i) by (3+4i) you would:
Note that using g OP 1 to enter and leave complex mode isn't the way to go, as this consumes the contents of the xregister. Well, you wouldn't want it to be easy and/or intuitive, would you? If it were, anyone could use it! (Apologies if I'm overlooking something simple here.) Nigel (UK) 

10152022, 12:23 AM
(This post was last modified: 10152022 12:25 AM by Matt Agajanian.)
Post: #3




RE: Cuvee RPN67 & Complex mode
Thank for the explanation. I do understand how to use h CPLX. Yes, that’s pretty straightforward.
But, to me it doesn’t make sense that once you’re in complex mode, shouldn’t that mean 3+4i x 9+5i is entered as. 3 ENTER 4 ENTER 9 ENTER 5 ENTER X since complex mode is active? But, I'm still puzzled about the 1 g OP CPLX MODE function. I could see the checking mode operation as (n<> 0 and n<>1) g OP CPX MODE. But, why wouldn’t activating Complex Mode first with 1 g OP CPX MODE and then to evaluate 3+4i x 9+8i entering 3 ENTER 4 ENTER 9 ENTER 8 X would reveal the real component in X and imaginary component would be in Y. In other words, shouldn’t 1 g OP CPX MODE already be sufficient to set up complex mode? (10142022 02:45 PM)Nigel (UK) Wrote: A brief explanation can be found here (search for CPLX on that page). In short, you can't enter complex numbers onto the stack while you are in complex mode! You have to leave complex mode first, enter the numbers, and then go into complex mode and press whatever buttons you like. 

10152022, 12:03 PM
Post: #4




RE: Cuvee RPN67 & Complex mode
The problem is that in complex mode pressing ENTER copies both the X and Y registers into Z and T, so you can’t enter numbers one at a time. I tried to enter numbers in complex mode using x<>y, like this:
4 x<>y 3 ENTER 5 x<>y 9 MULTIPLY But when the final 9 is pressed, the 5 in Y is copied into T! It helps to have the stack contents display visible while experimenting. It is then very clear when something isn’t working! Nigel (UK) 

10152022, 04:45 PM
(This post was last modified: 10152022 04:46 PM by Matt Agajanian.)
Post: #5




RE: Cuvee RPN67 & Complex mode
(10152022 12:03 PM)Nigel (UK) Wrote: The problem is that in complex mode pressing ENTER copies both the X and Y registers into Z and T, so you can’t enter numbers one at a time. I tried to enter numbers in complex mode using x<>y, like this: Thanks. So, outside of testing the setting with x (other than 0 or 1) g OP CPX MODE to see or test the setting, what’s the purpose of setting or clearing Complex mode with the g OP CPX MODE operation? 

10152022, 09:37 PM
Post: #6




RE: Cuvee RPN67 & Complex mode
I think that g OP CPX MODE would be useful in a program, to establish definitely that complex mode is turned on or off at the start. CPLX can then be used to toggle as needed.
Nigel (UK) 

10162022, 08:11 PM
Post: #7




RE: Cuvee RPN67 & Complex mode
I’m thinking of this as another workaround:
12+40i x 61+50i 12 ENT 40 ENT 61 ENT 1 g OP CPX MODE CLx 50 x Just a little additional step, but it gets the correct calculation. 

10192022, 09:04 AM
Post: #8




RE: Cuvee RPN67 & Complex mode
As the author of RPN67, let me put my two cents in.
Complex mode was designed as a convenient utility for doing quick evaluations of operations and functions involving complex numbers. It doesn't turn RPN67 into a complex numbers calculator. RPN45, on the other hand, sports a "real" complex mode, complete with 4level stack and unrestricted register arithmetic. If highcontrast mode is on, you can even see the the full complex result with both real and imaginary parts. To input 2+3i, for example, you would type 2 ENTER 3 I, without losing any stack level (except the complex number in T, of course). 

10192022, 04:37 PM
Post: #9




RE: Cuvee RPN67 & Complex mode
Thank you for this perspective. As well as RPN67 I also own RPN45, 70, and 97 so I'm certainly a fan of your work! To be honest I'd never looked at the RPN67 complex mode before reading Matt's post about it; I was a little surprised at what it was like, given how complex mode is implemented in RPN45, but that's fine. There's nothing wrong with being different. All of these calculators look great and work brilliantly!
Incidentally, the following key sequence allows the calculation of (1+2i) x (3+4i) on RPN67 entirely within complex mode:
Nigel (UK) 

10192022, 07:28 PM
Post: #10




RE: Cuvee RPN67 & Complex mode
SNIP
(10192022 04:37 PM)Nigel (UK) Wrote: Incidentally, the following key sequence allows the calculation of (1+2i) x (3+4i) on RPN67 entirely within complex mode:SNIP. That’s an improvement compared to my method. It looks like I’ll be using your method instead. Thanks! 

10192022, 09:02 PM
Post: #11




RE: Cuvee RPN67 & Complex mode
(10192022 04:37 PM)Nigel (UK) Wrote: Thank you for this perspective. As well as RPN67 I also own RPN45, 70, and 97 so I'm certainly a fan of your work! To be honest I'd never looked at the RPN67 complex mode before reading Matt's post about it; I was a little surprised at what it was like, given how complex mode is implemented in RPN45, but that's fine. There's nothing wrong with being different. All of these calculators look great and work brilliantly! Correct. I was just going to suggest this method, when I noticed your post. Incidentally, the next version will have a new Extra Function (number 16) called Toggle CPLX Mode. It will simply turn complex mode on or off. So you store 16 in the FN register, then execute g OP EXEC FN to toggle complex mode. The stack remains unaffected. For convenience, you may even add a 3step program: Code: LBL C 

« Next Oldest  Next Newest »

User(s) browsing this thread: 2 Guest(s)