Complex Lock mode for WP-34s
|
03-19-2015, 07:11 PM
Post: #21
|
|||
|
|||
RE: Complex Lock mode for WP-34s
I haven't checked your code changes. otherwise I might be able to answer the question myself: Have you checked that complex lock mode doesn't conflict with some XROM code? CPX as a command prefix might be used for some code optimization tricks or just for handling complex arguments. A safe way to deal with this is to ignore the setting when executing XROM code.
Marcus von Cube Wehrheim, Germany http://www.mvcsys.de http://wp34s.sf.net http://mvcsys.de/doc/basic-compare.html |
|||
03-19-2015, 09:47 PM
Post: #22
|
|||
|
|||
RE: Complex Lock mode for WP-34s
This is a very welcome improvement in the 34s ability to manipulate complex numbers. I love that you can see both components simultaneously.
If we're voting, I prefer option 3 'Mag' and 'Angle'. Option 2 is a close runner up, and option 1 a distant 3rd. Thanks Nigel, fantastic work! |
|||
03-20-2015, 10:48 AM
Post: #23
|
|||
|
|||
RE: Complex Lock mode for WP-34s
(03-20-2015 02:25 AM)BarryMead Wrote: I discovered a discrepancy between what the actual calculator/emulator does and what the manual says it does. In the manual it says that if "Pi" (h + EEX) is pressed immediately after CPX it puts the pi value into the Imaginary part of the number. But this is not what the actual calculator/emulator does. It ALWAYS puts the pi value into the REAL part of the number and 0 (zero) in the imaginary part, irregardless of weather you just pressed CPX or not. You cannot enter (0 + i pi) unless you exit complex lock mode and put the 0 and pi values into the X and Y registers and reenter complex lock mode. I think the manual is correct so far as pi is concerned. There are two pi functions:
You are correct about the catalogue of constants issue. At present entering a constant either simply enters it, or overwrites the number currently being entered with (const + i 0) or (0 + i const). There is a choice here:
Thank you for finding these issues. The (h + pi) problem has been present for a while without me noticing it, which surprises me. I press pi many times a day, but perhaps most often at the start of a calculation. Nigel (UK) |
|||
03-20-2015, 05:56 PM
(This post was last modified: 03-20-2015 05:57 PM by BarryMead.)
Post: #24
|
|||
|
|||
RE: Complex Lock mode for WP-34s
(03-20-2015 10:48 AM)Nigel (UK) Wrote: I think the manual is correct so far as pi is concerned. There are two pi functions:Nigel: Thanks for clearing that up for me. I never tried the "f" shifted Pi because the Pi on the keyboard is green not yellow. I guess when I read the manual my mind auto-corrected the "f" to an "h". I thought I understood what I read, but didn't. Yes it DOES work as you describe in the manual. Sorry for my misinterpretation. On the related topic of constants, I certainly see why you implemented it the way you did. If one needs custom number pairs involving constants, they can always exit complex lock mode and enter them separately into the X and Y registers. |
|||
03-23-2015, 12:40 AM
Post: #25
|
|||
|
|||
RE: Complex Lock mode for WP-34s
(03-19-2015 05:41 PM)Jeff O. Wrote:(03-18-2015 02:50 AM)Bit Wrote: This looks like a very useful feature indeed! Thank you for your kind words. The beauty of open source development is that everyone can contribute to whatever they care most about or are most skilled at. I'll definitely have a closer look at this feature when I have the time. Right now I'm tied up with other projects, and I probably won't be able to do much until mid April earliest. |
|||
03-23-2015, 03:33 AM
Post: #26
|
|||
|
|||
RE: Complex Lock mode for WP-34s
Another way to scrape back some space would be to remove features. e.g. the statistical distributions or the matrix functions are both sizeable.
Pauli |
|||
03-23-2015, 12:03 PM
Post: #27
|
|||
|
|||
RE: Complex Lock mode for WP-34s
(03-23-2015 12:40 AM)Bit Wrote: I'll definitely have a closer look at this feature when I have the time. Right now I'm tied up with other projects, and I probably won't be able to do much until mid April earliest. Anything you can do, on whatever schedule is good for you, will be be much appreciated. Jeff Dave - My mind is going - I can feel it. |
|||
03-23-2015, 05:12 PM
Post: #28
|
|||
|
|||
RE: Complex Lock mode for WP-34s
Just upgraded my 34S to include this complex mode. Really good mod. In may case it turns the machine much more usable.
Regards. |
|||
04-08-2015, 07:34 AM
Post: #29
|
|||
|
|||
RE: Complex Lock mode for WP-34s | |||
04-08-2015, 07:50 AM
Post: #30
|
|||
|
|||
RE: Complex Lock mode for WP-34s | |||
04-12-2015, 02:59 PM
Post: #31
|
|||
|
|||
(Small) Update for complex lock mode
I'm sorry for my absence; other pressing matters have been engaging my attention. I'm back now!
From the comments in this thread it seems to me that the current interface and behaviour of the complex lock mode is satisfactory. Because of this I've made no substantial changes. There have been a few minor bug fixes, and a change in behaviour of the constants menu. I have changed the names displayed when entering numbers in polar form and I have tried to speed up polar display mode (which works well on the emulator but is rather slow on the calculator). The updated patch file, calc.bin file, emulator, wp34s.op file, and documentation are available from the links at the end of the first post of this thread. A few more details:
Thanks for all the feedback and suggestions in this thread. I hope to upload the code as a separate branch of the WP-34s project once I find myself somewhere with decent internet speeds. Nigel (UK) |
|||
04-12-2015, 09:29 PM
Post: #32
|
|||
|
|||
RE: Complex Lock mode for WP-34s
(04-12-2015 02:59 PM)Nigel (UK) Wrote: Entering a number in polar display mode was slow on the calculator (about 1 second). The delay seems to be caused by the op_p2r function in decn.c; I don't really understand why this function is slower when called by my code than when it is called by the P->R keyboard function, but there it is. I've rewritten the op_p2r function so that it only calls the sincosTaylor function once (roughly doubling the speed) but I feel I'm missing the point of something. Different angle units I suspect. sincosTaylor works in radians only. decNumberSin and decNumberCos honour the current unit settings. In complex mode, they are all the same since radians is always in force. Out of complex mode, you'll have possibly broken things. I coded p2r this way to save space The performance issue is probably due to a low clock rate being used during keyboard entry. Try calling update_speed(0) first, if you are not in a program. I don't think you need to use full speed, the trigonometric functions evaluate pretty quickly and you're working at user speed here. Pauli |
|||
04-12-2015, 10:57 PM
Post: #33
|
|||
|
|||
RE: Complex Lock mode for WP-34s
(04-12-2015 09:29 PM)Paul Dale Wrote:(04-12-2015 02:59 PM)Nigel (UK) Wrote: Entering a number in polar display mode was slow on the calculator (about 1 second). The delay seems to be caused by the op_p2r function in decn.c; I don't really understand why this function is slower when called by my code than when it is called by the P->R keyboard function, but there it is. I've rewritten the op_p2r function so that it only calls the sincosTaylor function once (roughly doubling the speed) but I feel I'm missing the point of something. Thanks for your reply. The angle units are ok (I've included a call to cvt_2rad before sincosTaylor) and everything seems to work properly. Still, space is definitely at a premium and if the call to update_speed works I'll return to the original code. Nigel (UK) |
|||
04-12-2015, 11:39 PM
Post: #34
|
|||
|
|||
RE: Complex Lock mode for WP-34s
(04-12-2015 10:57 PM)Nigel (UK) Wrote:(04-12-2015 09:29 PM)Paul Dale Wrote: The performance issue is probably due to a low clock rate being used during keyboard entry. Try calling update_speed(0) first, if you are not in a program. I don't think you need to use full speed, the trigonometric functions evaluate pretty quickly and you're working at user speed here. Works like magic! update_speed(0) does the trick perfectly. I've updated the downloadable files in the first post. Nigel (UK) |
|||
04-13-2015, 01:55 PM
Post: #35
|
|||
|
|||
RE: Complex Lock mode for WP-34s
(04-12-2015 02:59 PM)Nigel (UK) Wrote: I'm sorry for my absence; other pressing matters have been engaging my attention. I'm back now! No need to apologize, glad you are are back. (04-12-2015 02:59 PM)Nigel (UK) Wrote: [*]"Mod:" and "Arg:" have changed to "Length:" and "Angle:", which seemed to be the most popular choice. However, what about "Amp:" and "Phase:"? This might make the electrical engineers even happier. I cannot speak for all electrical engineers, but I work with a variety of value types in complex polar form in addition to Amperes, i.e. Volts, MVA, and impedance, so "Amp:" and "Phase:" would not fit in all cases. Better to have more universal names that apply to all types of values. (04-12-2015 02:59 PM)Nigel (UK) Wrote: Or how about using "r:" and "theta:" (Walter's suggestion, I think) in CPXI mode, while allowing another pair of names in CPXJ mode? I have no objection to "Length:" and "Angle:" or to "r:" and "theta:". If you wish to implement a difference pair of component names when CPXJ mode is selected, my preference would be "Mag:" and "Angle:" since that is the way I learned it in my EE course work all those years ago. (Again not trying to speak for all EEs, just my personal preference.) Thanks for your continued work on this, I am anxious to try the latest version. Jeff Dave - My mind is going - I can feel it. |
|||
04-13-2015, 08:31 PM
Post: #36
|
|||
|
|||
RE: Complex Lock mode for WP-34s
(04-13-2015 01:55 PM)Jeff O. Wrote:(04-12-2015 02:59 PM)Nigel (UK) Wrote: [*]"Mod:" and "Arg:" have changed to "Length:" and "Angle:", which seemed to be the most popular choice. However, what about "Amp:" and "Phase:"? This might make the electrical engineers even happier. By "Amp:" I meant "amplitude" so this would apply to any sinusoidally varying quantity. Not so good for 2D vectors though. I'll leave things as they are for now! Nigel (UK) |
|||
04-14-2015, 11:42 AM
Post: #37
|
|||
|
|||
RE: Complex Lock mode for WP-34s
(04-13-2015 08:31 PM)Nigel (UK) Wrote: By "Amp:" I meant "amplitude" so this would apply to any sinusoidally varying quantity. Not so good for 2D vectors though. I'll leave things as they are for now! Oops, that did not even occur to me! When I see "Amp", it means "Ampere" to me. (I do actually prefer the full word over the abbreviation - after all, the unit of electric current is named in honor of André-Marie Ampère, and I'm not sure it's nice to abbreviate someone’s name.) Dave - My mind is going - I can feel it. |
|||
04-14-2015, 12:18 PM
Post: #38
|
|||
|
|||
RE: Complex Lock mode for WP-34s
(04-14-2015 11:42 AM)Jeff O. Wrote: Oops, that did not even occur to me! When I see "Amp", it means "Ampere" to me. (I do actually prefer the full word over the abbreviation - after all, the unit of electric current is named in honor of André-Marie Ampère, and I'm not sure it's nice to abbreviate someone’s name.) If you look for the official abbreviation for Ampere, it's A. Period. d:-) |
|||
04-14-2015, 01:14 PM
Post: #39
|
|||
|
|||
RE: Complex Lock mode for WP-34s
(04-14-2015 12:18 PM)walter b Wrote:(04-14-2015 11:42 AM)Jeff O. Wrote: Oops, that did not even occur to me! When I see "Amp", it means "Ampere" to me. (I do actually prefer the full word over the abbreviation - after all, the unit of electric current is named in honor of André-Marie Ampère, and I'm not sure it's nice to abbreviate someone’s name.) No, there's no period after the A :D Greetings, Massimo -+×÷ ↔ left is right and right is wrong |
|||
04-14-2015, 01:57 PM
Post: #40
|
|||
|
|||
RE: Complex Lock mode for WP-34s | |||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)