Complex Number Entry on Prime


I appreciate that it is possible to directly enter complex numbers in either polar or rectangular form directly from the keyboard with no need to use parentheses, and that they may be displayed as x+y*i. (I wish that the i key was primary, but accept that I'll have to wait for the 43s to get that wish fulfilled.) However, there are a couple of problems (in my view) with entry of rectangular-form complex numbers using the i key, as follows:

  1. Currently, there appears to be no way to enter a value with a negative imaginary component. Say you want to enter 3 - 4 i. If you key in 3 i 4 +/-, the sign of the 3 changes, not the sign of the 4. The only way to enter a complex number with a negative imaginary component appears to be to use parentheses, where pressing +/- after entering the comma will either change sign of the imaginary value, if already keyed-in, or insert a minus sign that can then be followed by the imaginary value. I realize that using parentheses to enter a complex number takes the exact same number of keystrokes as using shift-2 to enter using i, and that if you have complex display set to a+b*i the value will appear in that form after entry. But I would prefer to enter all complex values as aib, and not have to remember that I need to enter as (a,b) if b happens to be negative. It is possible to use the +/- key to enter a negative angle after pressing the angle key when entering a polar form complex value, so I’m hopeful that this behavior can be applied to rectangular form after pressing the i.
  2. Although you may key in just i to either use directly or press Enter to get i on the stack, if you want to enter any other complex number which has zero real part, you must press 0 before pressing i. In other words, press shift-2 Enter and you get i in stack-1. Pressing shift-2 2 in an effort to get 2*i in the stack throws a syntax error, you must enter 0i2. It would be nice if any complex value with zero real part could be entered as ib.

It is possible that the above have already been reported. I searched the archive for “Prime” and “complex”, but found no mention. If they have indeed been reported, please accept my apologies for reporting them again.


1. Enter it as 3 + 4 +/- i


That will work in algebraic mode but not RPN.


Yeah, there are a lot of problems with RPN entry on this calculator. I've given up on it completely, and use only algebraic or textbook entry on the Prime. I use my 50g if I want to do anything in RPN.


I understand. I continue to use RPN mode and hope it can improved if possible.


In RPN mode you will need to use single quotes to enter a negative imaginary component.


Note that the multiplication sign is required.


Thanks for the suggestion. That method does take a few more keystrokes than just using parentheses. Also, if I enter a value this way, the calculator treats it differently:

(3,-4) ENTER ---->  3 - 4*i
shift x2 (for square root) ----> 2 - i

'3-4*i' ENTER ----> 3 - 4*i
shift x2 (for square root) ----> \/3 - 4*i

My real hope is that Tim W might incorporate my suggestions into a future upgrade.


Couple of things jump out immediately.

1) I suspect the issue with typing 3i4 NEG comes from the desire for 1+5i[NEG] to put in a negative before the 5i rather then adding it in place such as on the 50g where '1+5i[NEG]' would actually insert '1+5i-' like so. I can see how making the i behave like that would be helpful, but tick everyone else off. Will investigate here.

2) The reason the sqrt('') behaves like you are showing is precisely why it does the same thing on the 50g. You have an algebraic and take the sqrt of it. Use the EVAL on the shifted comma and it will evaluate appropriately.

Now that being said, this does seem to show a problem with the display of a complex in RPN. It prints out the complex as 3+4i for example, but it really is not a algebraic object. Rather, it is just printed in the 'standard' form.

Would it hugely offend anyone if the options you have for a complex number printing while in RPN mode were (X,Y) or XiY forms rather then the current (X,Y) and X+Yi? Note that wouldn't impact any algebraic, but rather be the purely "numerical" complex number.

Edited: 11 Nov 2013, 3:01 p.m.


It makes no difference to me, since I've always used the (X,Y) form going all the way back to my HP 28S.



Thanks for your attention to and consideration of my issue.

I can't really comment on 3i4 NEG messing up how the 50g works. I just seems like* if it can parse a "naked" (i.e., no tick marks, no parentheses) 3i4 into 3+4*i and 3/4 +/- into 3/-4 , then it should parse 3i4 +/- into 3-4*i.

As for the behavior when entering as '3-4*i' (with the tick marks), I assumed it was due to my ignorance regarding algebraics. It just looked exactly the same upon entry in the display.

As for displaying purely "numerical" complex numbers as XiY, would that be 3+i4 or 3i4? More importantly, for negative imaginary, 3-i4 or 3i-4? I would very much like the 3+i4, 3-i4 option.

* to clarify, I guess I mean it seems to me, as a person ignorant of all the implications of implmenting the behavior I would like to see.

edited to add clarification

Edited: 12 Nov 2013, 12:11 p.m.


I would vote for X+Yi over XiY. The latter would confuse people who are not users of the 35S.

Edited: 13 Nov 2013, 9:04 p.m.


The problem is how do you distinguish between 1+5*i and 1+5*i. One is an algebraic object, and the other is a complex number. Take a look a the example where he did a sqrt and it did not evaluate the result down.



The Prime could rigorously distinguish between lowercase i as a variable and italicized i (shift-2) as being the sqrt(-1).


I beleive that is the end goal, but requires quite a bit of extensive work in the CAS interactions first.


Which is why I prefer the form (X,Y). ;>)


I basically detest the (X,Y) form. Really hoping for X+iY and X-iY, depending on the sign of the imaginary part.


Different strokes for different folks.




I basically detest the (X,Y) form.
Many students like it because it looks like the coordinates of a point on the complex plane, which of course it is. They are already very accustomed to using (a,b) for points, so they are comfortable with this notation.


I guess I don't like it because it looks like the coordinates on an X-Y plane, i.e., it is not unequivocally complex to me. But mostly because 4 years of EE schooling and a _few_ years of practice drilled R + j X into my head. I can live with i vs. j, but prefer that form.

Edited: 16 Nov 2013, 4:50 p.m.

Possibly Related Threads…
Thread Author Replies Views Last Post
  HP Prime: complex numbers in CAS. Alberto Candel 1 1,904 12-06-2013, 02:36 PM
Last Post: parisse
  [HP Prime] Plots containing complex numbers bug? Chris Pem10 7 3,637 12-05-2013, 07:40 AM
Last Post: cyrille de Brébisson
  HP Prime: adding an entry to a vector Alberto Candel 12 4,049 12-02-2013, 01:18 PM
Last Post: Alberto Candel
  A fast Bernoulli Number method for the HP Prime Namir 16 5,478 11-22-2013, 04:46 PM
Last Post: Namir
  [HP Prime] Calculating Prandtl Number with Units (bug found in USIMPLIFY) Timothy Roche 1 1,358 11-13-2013, 04:07 PM
Last Post: cyrille de Brébisson
  HP Prime: Converting number to Sci notation and back BruceTTT 1 1,557 11-12-2013, 02:11 AM
Last Post: Phil Wipf
  HP PRIME: Fixed 4 number format 0.001000 Joseph Ec 18 5,323 11-07-2013, 11:51 AM
Last Post: Geoff Quickfall
  HP Prime: Number of external Variables Davi Ribeiro de Oliveira 0 1,015 11-01-2013, 08:10 PM
Last Post: Davi Ribeiro de Oliveira
  Program to change entry mode on Prime Michael de Estrada 3 1,904 10-28-2013, 10:13 AM
Last Post: Han
  Line number in Prime program listings Harold A Climer 3 1,894 10-27-2013, 03:37 PM
Last Post: Les Koller

Forum Jump: