Complex Lock mode for WP-34s
|
03-16-2015, 08:03 PM
(This post was last modified: 05-03-2015 09:39 PM by Nigel (UK).)
Post: #1
|
|||
|
|||
Complex Lock mode for WP-34s
This post presents a "complex lock" mode for the WP-34s. At the end of the post are links to a firmware patch file (taken relative to build 3769), a zip file of the windows emulator that runs this firmware, a calc.bin file containing the firmware, and some documentation of the features of this new mode.
Complex lock mode has been developed jointly by Jeff O (motivation, lots of user interface suggestions and bug-spotting) and myself (coding). The WP-34s already has wonderful support for complex numbers. However, doing a long series of such calculations is not as easy as it could be. Real and imaginary parts have to be entered in reverse order, a zero imaginary part is needed even when a number is purely real, and CPX must be pressed before each operation. This complex lock mode doesn't try to add any totally new features, but rather tries to make it easier to use the powerful features that the WP-34s already has. Turning on complex lock mode for the first time is a two-step process. On a calculator or an emulator running the new firmware, execute CPXYES from the Mode menu. Then pressing (right-arrow) + CPX enters the new mode. (The small "=" sign lights up to show that the mode has been entered.) Pressing (right-arrow) + CPX again returns to normal mode; executing CPXNO from the Mode menu prevents the mode being reactivated until CPXYES is executed once more. The reason for the two-step process is to stop a user from entering the mode accidentally. If this isn't a concern, one can execute CPXYES and forget about doing it again, at least until the calculator is reset. To do the calculation (40+12i)*(3+5i), press: Code:
and after CPX is pressed ... and just before ENTER is pressed ... and after ENTER is pressed ... . CPX separates the real and imaginary parts of a number. To multiply the result of this calculation by 3, simply press Code:
Code:
Number entry can be terminated with CPX instead of ENTER. Pressing Code:
Code:
When entering complex lock mode the stack is automatically set to 8 levels (the prior setting is saved, and restored later). The real and imaginary parts of complex numbers are stored in pairs of registers just as they would be normally, so that there is always a four-level stack for complex number calculations. Most functions on the keyboard do their normal "complex" thing - so to find the square root of 4+2i, press Code:
There is also a polar entry mode available in which complex numbers are entered and displayed as (modulus, argument) pairs. In this mode the real and imaginary parts of complex numbers are still stored in the stack so that all of the WP-34s functions continue to work correctly. See the attached Word document for details of this and other features. Here's a picture: Finally - and this is the icing on the cake for all you electrical engineers out there - there are two more commands in the Mode menu, CPXI and CPXJ. CPXJ displays complex numbers with a "j" instead of an "i". Great! What's not to like? Several things.
Here are some comments on the code for anyone who wants to look at it:
Nigel (UK) and Jeff O Edit: slightly updated version (12/04/15, or 04/12/15 for the US!).
Edit: another small update (13/04/15) incorporating a suggestion from Pauli for improving entry speed in polar display mode. Edit: another small update (19/04/15) incorporating another polar display mode speed-up, some bug fixes, and firmware that no longer uses user flags. Edit: code tidying and a fix for a bug that prevented the QT emulator from compiling. The downloads below have been updated.
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)