[WP 34S] Complex calculations (poll)  Printable Version + HP Forums (https://archived.hpcalc.org/museumforum) + Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum1.html) + Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum2.html) + Thread: [WP 34S] Complex calculations (poll) (/thread216550.html) 
[WP 34S] Complex calculations (poll)  Walter B  04042012 Ladies & gentlemen, we ask you for your opinion in the following matter: Assume you have a complex formula like
with the complex number z = x + i y in x and y. No problem with the WP 34S: CPX ENTERand there you are :) Now the question: Shall we ...
TIA for your votes. Walter
Edited: 4 Apr 2012, 4:17 a.m.
Re: [WP 34S] Complex calculations (poll)  Marcus von Cube, Germany  04042012 Just to elaborate on this: We have currently shortcuts for all one digit numbers with zero imaginary part by pressing CPX digit. The sequence will execute (or program) the c# 00n command with the digit as its argument. The command puts 0 in Y and the argument in X so that CPX 3 is equivalent to 0 ENTER 3 in interactive mode (in program mode this will cost 2 additional steps compared to c# 003). There is no problem with CPX 0 to CPX 2 and CPX 4 to CPX 9 but CPX 3 used to be a shortcut for the complex catalogue, saving the keystroke for the prefix h. What we are asking is the following: Shall CPX 3 enter (3,0) as a complex number (a) or shall it open the catalogue of complex functions (b)? The former is consistent with the other CPX digit combinations, the latter saves a keystroke when executing the commands in the complex X.FCN catalogue. At present we have 2 votes for version (a), mine and Pauli's, while Walter is in favour of version (b). Edit: (a) is Walter's second option, (b) his first alternative.
Edited: 4 Apr 2012, 5:14 a.m. after one or more responses were posted
Re: [WP 34S] Complex calculations (poll)  fhub  04042012 Quote:Now you have (CPX) 3 votes for (a). :) IMO it's absolutely inconsistent that CPX n works for all digit but not for 3.
Edited: 4 Apr 2012, 4:35 a.m.
Re: [WP 34S] Complex calculations (poll)  Morten Nygaard Åsnes  04042012 Option a (which is alternative 2 above right?)
Re: [WP 34S] Complex calculations (poll)  Paul Dale  04042012 Not mentioned thus far is that in making CPX 3 open the complex X.FCN catalogue, we will lose short cuts to 4 through 9. Having such a gap is silly and inconsistent and this would be the fix. This might extend to 0 through 2 as well but might not  don't worry about this for the purposes of this poll however. This is a future discussion.
Apart from the conjugate, these seem like they'll be relatively uncommonly used  most are in the group of functions for which we've a real implementation and there is a natural complex extension. Anyone who uses complex numbers a lot please let us know if this assumption is incorrect. As for the conjugate, it is never more, and will mostly be fewer, keystrokes to type x<>y +/ x<>y than to open the catalogue up and execute the conjugate function. Thus, this one isn't really a concern for calculations from the keyboard, only in some programs.
Re: [WP 34S] Complex calculations (poll)  Bart (UK)  04042012
Quote:I agree, therefore my vote goes to (a) too. Re: [WP 34S] Complex calculations (poll)  Paul Dale  04042012 Yes, option a is alternative 2 :(
 Pauli
Re: [WP 34S] Complex calculations (poll)  Paul Dale  04042012 Or more concisely (I hope):
CPX +/ Yeah, I can't resist ;)
Re: [WP 34S] Complex calculations (poll)  Harald  04042012 I would vote for (a) too. Simply because it seems more consistant. What I do find tedious though is having to press CPX before each and every function. Maybe it would be possible to put the calculator in "complex mode" by pressing CPX CPX and inverting the function of the CPX key (kind of like caps lock)?
Cheers, Re: [WP 34S] Complex calculations (poll)  fhub  04042012 Quote:Well, seeing that many CPX prefixes, I would even vote for a complex 'mode': switching this mode on with CPX CPX and off again with a single CPX. Or any other (maybe better) on/off method. Ok, I know, there's no bit left in RAM for such a complex mode ... ;)
Franz
Re: [WP 34S] Complex calculations (poll)  fhub  04042012 Quote:Oh my god, you must have read my mind! :) Re: [WP 34S] Complex calculations (poll)  Bart (UK)  04042012 I find myself agreeing with Franz  again :)
Re: [WP 34S] Complex calculations (poll)  Paul Dale  04042012 A locking CPX key is a bad idea IMHO. When you are in complex mode you want some operations to be complex and others to not be. Think ENTER just for a start (yes I know this one can most be coded around but I'm sure it isn't the only such dual mode function).
Re: [WP 34S] Complex calculations (poll)  fhub  04042012 Quote:And for the emulator we'll have to use a 2nd mouse!? ;)
I don't like this 'hold CPX' option and I'm quite sure it will not be so easy to implement (and probably break many other things again). A complex mode with on/off switching would certainly be more simple for both, to implement and to use.
Re: [WP 34S] Complex calculations (poll)  Paul Dale  04042012 My guess would be the press and hold will be slightly easier to implement than dealing with multiple CPX presses  we've already got held key detection. I could be wrong of course. I doubt either change would cause much breakage beyond the show term at least.
Re: [WP 34S] Complex calculations (poll)  Harald  04042012 Quote:If it was done like "caps lock" you could then press CPX for that. Basically inverting the CPX key would be best in my opinion. CPX CPX could switch between inverted and noninverted. That would result in far less keystrokes, as most of the operations are complex and only a few are real. As demonstrated by your examples.
Quote: 100% agreed, I would love to see that. The 42S is perfect in that respect. But I can understand this isn't really an option for the 34S. Display limitations beeing the obvious reason for that.
Cheers, Re: [WP 34S] Complex calculations (poll)  Paul Dale  04042012 Quote: Look at the xrom sources for more substantial examples. Complex operations are generally interspersed with real operations and stack shuffling commands. While there are some sequences of complex operations, none are particularly long. Typing [cmplx] in these sources is a *lot* more tedious than prefixing each with the CPX key BTW :)
Re: [WP 34S] Complex calculations (poll)  Walter B  04042012 Just in case you've forgotten: I don't like the 'press & hold' paradigm. But maybe even a single CPX can do what Franz wants: first CPX entering 'complex mode'  second CPX leaving it (like [alpha] does for alpha mode). :)
Re: [WP 34S] Complex calculations (poll)  Harald  04042012 Quote:
Yes, or even that simple!
Re: [WP 34S] Complex calculations (poll)  Walter B  04042012 Since my colleagues unveiled their opinions in that matter, let me do the same. Why don't I like CPX 3 entering (3 ; 0) saving a keystroke over 0 ENTER 3, and prefer CPX X.FCN saving a keystroke over CPX h X.FCN instead? Well, we use CPX as prefix for complex operations consistently so far. CPX ENTER pushes a complex number on the stack, CPX x<>y swaps two complex numbers, CPX x calculates the absolute value of a complex number, CPX RCL recalls a complex number from two adjacent registers, etc. First of all, I think '0 ENTER n' is easy enough to be memorized for the cases it's needed. Second, CPX 3 entering a *real* number 3 may be misleading  it's simply not entering a complex number. So why should that carry a complex prefix? Just confusing terms ... Walter
Re: [WP 34S] Complex calculations (poll)  Harald  04042012 Quote:Agreed, still inconsisten though. Quote:But thinking that through, it shouldn't work for ANY number. Maybe that would be the solution. That in combination with a "complex mode". Re: [WP 34S] Complex calculations (poll)  Paul Dale  04042012 And in what way isn't 3 + 0i a complex number??
Re: [WP 34S] Complex calculations (poll)  fhub  04042012 Quote:And exactly this would not be true anymore with your suggestion. Show me any other green function which doesn't require [h] as prefix, so why this CPX X.FCN ??? Quote:I'd say you're VERY wrong! Of course CPX 3 is entering a complex number (3+0i), because it puts 0 on the Ystack (the imaginary part). Just as all other CPX functions/operators are working, they simply manipulate 'real' numbers, but for X and Y and in a way that the result (in X and Y) can be interpreted as complex numbers.
Nevertheless I agree with Harald, I also won't really miss these CPX n shortcuts for complex integers of the type n+0i, because they are indeed VERY rarely needed.
Edited: 4 Apr 2012, 8:34 a.m.
Re: [WP 34S] Complex calculations (poll)  fhub  04042012 Additionally to a special 'complex mode' I would even suggest a separate 'complex catalog' C.FCN, since CPX X.FCN not only contains complex functions from X.FCN, but also other complex operations from P.FCN (e.g. CPX DROP, etc.) And there are still a few (green) key locations which could be used for this C.FCN: for example PSE or ./, are used either only in program mode or so seldom, that they would better be placed in a catalog or mode menu.
Franz
Re: [WP 34S] Complex calculations (poll)  Marcus von Cube, Germany  04042012 It might be helpful at times but hurting at other times. In "complex lock" mode the digits should work as for normal digit entry, not as they do now after hitting CPX, entering the c# 00n command. As a possible alternative I may introduce a press and hold like the shift keys but this needs extra programming in the low level routines.
Re: [WP 34S] Complex calculations (poll)  Dominic Richens  04042012 Franz, With your suggestion of CPX working like a "caps lock", I don't think we would need a separate C.FCN catalog  just only show items in P.FCN and X.FCN that are valid in complex mode. DROP is an exception in that it is in both P.FCN and X.FCN catalog.
I think using CPX as a "mode lock" is fitting in that it is the same key that is used for the MODE catalog :)
Re: [WP 34S] Complex calculations (poll)  fhub  04042012 Quote:Well, in principle you're right, Dominic. But the problem is that there are no complex functions in P.FCN at all, they are all put into the X.FCN catalog. Even for typical programming functions (like e.g. DROP) the complex function is in CPX X.FCN, whereas usually you find this DROP in the P.FCN menu  something that I don't like at all since a long time. And I've already mentioned this inconsistency a few times, but Walter is just keen on having all CPX functions in one catalog. :(
Franz
Re: [WP 34S] Complex calculations (poll)  Dominic Richens  04042012 Quote: I like this one  more consistent. I don't do complex math very often so consistency is important to me because I'll have forgotten how to do things.
However I also like the idea of CPX being a "mode lock", even though these two options are mutually exclusive. I know I used the complex mode on my HP15C  never remember it being a hindrance. I guess though that with the parallel imaginary stack it was easier to do real domain calculations while in complex mode since the i register was always 0 unless you put something there with f i or f Re<>Im.
Re: [WP 34S] Complex calculations (poll)  htom trites jr  04042012 CPX needs to do three things, and there's only one keytop. So: CPX followed by CPX sets CPX mode, which is canceled by CPX; in CPX mode, all operations are done as if prefixed by CPX if there's a CPX version of the operation. CPX followed by anything else executes anything else as complex; CPX mode is not entered. CPX CPX ... gosub ... return ; subroutine is in CPX mode upon entry, can cancel it with CPX. upon return, CPX mode is restored if it was undone in the subroutine, cleared if set in the routine.
Re: [WP 34S] Complex calculations (poll)  Eddie W. Shore  04042012 I will go with option 1, keep things consistent.
Re: [WP 34S] Complex calculations (poll)  fhub  04042012 Quote:I guess you misunderstood something  just option 1 in Walters poll is the inconsistent one. ;) Re: [WP 34S] Complex calculations (poll)  Walter B  04042012 Quote:Exactly. I doubt the use of 'CPX n' generally. '0 ENTER n' is sufficient. Re: [WP 34S] Complex calculations (poll)  Walter B  04052012 OK, we had eleven members participating in the poll so far. Of those, two vote in favour of alternative 1, and nine in favour of alternative 2. I modified the manual according to this result: CPX X.FCN is gone, CPX n is in. Changed and committed to SF :)
Re: [WP 34S] Complex calculations (poll)  Walter B  04052012 Franz, you may get driven out of the polling station ... ;)
Re: [WP 34S] Complex calculations (poll)  Marcus von Cube, Germany  04052012 If I find the time I'll add the press&hold feature of the shift keys to the CPX key without changing any other behaviour. CPX lock has been ruled out by some deeper analysis done by Pauli: It just doesn't pay off.
Re: [WP 34S] Complex calculations (poll)  fhub  04052012 Quote:Well, Walter, the problem with polls is that there's always a good chance that the result is not as you would like it. So it might have been better (for you) if you had described your poll in the following way: ;) Quote: Franz
Edited: 5 Apr 2012, 4:15 a.m.
Re: [WP 34S] Complex calculations (poll)  Walter B  04052012 Franz, I can live with the result. At least I don't insinuate the opposition doesn't understand the question.
Re: [WP 34S] Complex calculations (poll)  Walter B  04052012 We had that press&holdtopic earlier already ad nauseam  it will exclude onehanded use  please refrain from implementing that.
Re: [WP 34S] Complex calculations (poll)  fhub  04052012 Quote:No Walter, that was no insinuation, that was just an identification of a fact. ;) Re: [WP 34S] Complex calculations (poll)  Walter B  04052012 Quote:Now, Franz, that's enough. If you want to continue, please make your propaganda statements outside, at least 20m away from the polling station ;) Re: [WP 34S] Complex calculations (poll)  fhub  04052012 Quote:Oh, that's one of the very rare cases where I have to agree with you. :) (dass ich das noch erlebe!)
For f/g/h prefixes such a 'hold function' is indeed a good idea, but not for CPX in my opinion. Otherwise the next 'hold' wish (e.g. for the > prefix) would probably come soon ...
Re: [WP 34S] Complex calculations (poll)  Paul Dale  04082012 This press and hold is entirely optional for the user and would operate just like the press and hold we already have for the other shift keys. I just don't see what the problem is adding something that is oft requested and that has absolutely zero impact for those who choose to use their calculator one handed  you can still prefix every complex command with CPX so the old entry model is absolutely unchanged. It isn't as if you are being forced to press and hold to access anything, it just makes life a bit easier...
 Pauli
