Say with me: "Natural Complex Entry"



#2

I'm glad to report that finally the natural complex number entry is featured on the 41Z module!

This capability is implemented in the function "IMAGINE" - which until now was just a dummy place holder, but has become the heart of the matter now.

Assuming you have it assigned to the ENTER^ key, then the data entry sequence can't be more intuitive:

Re(z), ENTER^, Im(z), ENTER^

This will place the data in the XY registers appropriately, as well as lifting the complex stack automatically.

IMAGINE uses the "partial entry sequence" feature of the 41 OS - not for the faint of heart! Im(z) is entered by writing the digits and special characters into Alpha during the data entry process. The routine also updates the display at the same time to provide the feedback to the user.

During the process the keyboard is redefined, allowing only the following active keys:

- ENTER^ & R/S to terminate the entry

- numeric keypad

- back arrow to delete the previous entry

- comma for the decimal part

- EEX for the exponent field

- CHS for negative mantissa and exponent fields.

It supports both decimal choices for the radix, either comma or period as controlled by user flag 28. Features nice logic to control the sequence.

Once completed the information in the Alpha register is converted to numeric by using ANUM. Its built-in logic for it will resolve possible wrong typing, like repeated commas or EEX signs. Note that even on the new 35S there's the same issue, yielding 'Invalid Syntax' errors!

Arguably the wrong entries should be prevented during the process but that'll have to wait... let's say it's perfect and ready for users knowing their way around :)

Needless to say this doesn't replace the other methods to enter complex numbers, still available as until now. (Using ZREAL^, ZIMAG^, or ZENTER^)

Hope you enjoy it, will be posted at TOS in a couple of days I hope.

Best,
ÁM

Edited: 30 Sept 2009, 9:27 a.m.


#3

Quote:
This capability is implemented in the function "IMAGINE" - which until now was just a dummy place holder, but has become the heart of the matter now.

Assuming you have it assigned to the ENTER^ key, then the data entry sequence can't be more intuitive:

Re(z), ENTER^, Im(z), ENTER^

This will place the data in the XY registers appropriately, as well as lifting the complex stack automatically.


Assume you meant entering the number Re(z), then calling IMAGINE, entering Im(z), and finally calling IMAGINE again? If true, what is the functional difference between IMAGINE and traditional ENTER^ then? What did I miss?

TIA for enlightenment :)


#4

Quote:
Assume you meant entering the number Re(z), then calling IMAGINE, entering Im(z), and finally calling IMAGINE again? If true, what is the functional difference between IMAGINE and traditional ENTER^ then? What did I miss?

Well, for starters the sequence is in the natural order (as opposed to Im, ENTER, Re) which causes some trouble to some users. But the better aspect is the automated stack lift done by IMAGINE that saves a final ZENTER^ when using the alternative method.

You'll probably see this better if/when you try it by yourself, if you did.

Again, each user has his/her preferences - IMAGINE is important because goes beyond all other complex data entry implementations on the 41 done before.


#5

one word: awesome!

#6

A'ngel, why do you insist upon a natural complex number entry?
Just get over it and accept that the "i" portion must be entered first ! It's not that bad !
D

all this swicthing of regesters just confuses things. we need absolute certenty with 41c.

Edited: 2 Oct 2009, 8:43 a.m.


#7

Howdy Doug, glad to hear from you - even if it's about sound criticism :)

Well, I realize the debate isn't over and will probably never be - it reminds me the RPN vs. AOL saga. The fact is there are two camps, and people take sides on whether it should be "natural" or "reversed" data entry - mostly a matter of personal choice depending on what we learned first or got used to doing.

To me they're both about the same, just a cosmetic aspect - but the natural data entry represented a challenge to implement (for me at least, using the partial key entry routines) so I wrote the IMAGINE function as a way to learn more about it. Now the 41Z has BOTH ways to do it, so everybody's happy, right?

IMAGINE has an advantage over the "reversed" method: it performs the complex level lift, so you save pressing ZENTER^. This is not always required, only for dual-argument functions or for stack chained calculations.

The following is a more detailed rationale - sorry if it's boring:-

If you've used the 41Z you'll have noticed that the 4-level complex stack is implemented using an I/O buffer. The actual XYZT stack is just a "scratch pad" used to prepare the complex numbers. Mapping of the XYZY regs is to the buffer's Level 1 and Level 2. The synchronization amongst buffer and stack is done at different points, (like before and after performing a function), but there isn't automatic stack lift upon pressing numeric keys.

Anyway, the Module is submitted at TOS (Revision 6Z shows when you switch OFF the calculator), so go ahead and take it for a spin and let me know what you think.

Cheers,
ÁM


Edited: 2 Oct 2009, 2:33 p.m.


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP Prime: complex numbers in CAS. Alberto Candel 1 147 12-06-2013, 02:36 PM
Last Post: parisse
  [HP Prime] Plots containing complex numbers bug? Chris Pem10 7 335 12-05-2013, 07:40 AM
Last Post: cyrille de Brébisson
  HP Prime: adding an entry to a vector Alberto Candel 12 486 12-02-2013, 01:18 PM
Last Post: Alberto Candel
  Complex Number Entry on Prime Jeff O. 19 616 11-16-2013, 12:34 PM
Last Post: Jeff O.
  Program to change entry mode on Prime Michael de Estrada 3 205 10-28-2013, 10:13 AM
Last Post: Han
  Does RPN entry mode cause the Prime keyboard to lock up ? Michael de Estrada 14 530 10-22-2013, 06:27 PM
Last Post: John Colvin
  HP Prime complex results Javier Goizueta 0 99 10-06-2013, 12:59 PM
Last Post: Javier Goizueta
  HP Prime Solving Nonlinear System of Equations for Complex Results Helge Gabert 11 430 09-30-2013, 03:44 AM
Last Post: From Hong Kong
  [HP-Prime xcas] operations with complex numbers + BUGs + Request CompSystems 9 380 09-08-2013, 10:40 PM
Last Post: CompSystems
  Elliptic integrals of 1st and 2nd kind calculated by complex agm Gjermund Skailand 3 167 06-29-2013, 03:39 PM
Last Post: Gjermund Skailand

Forum Jump: