V41 and its display functions
|
05-08-2016, 03:56 PM
Post: #1
|
|||
|
|||
V41 and its display functions
For quite a while I have been using V41 ("Release 8"), and I always wondered why, unlike the "real thing", the display functions FIX, SCI and ENG prompt for a two-digit entry, i.e. FIX shows two underscores, like a STO or RCL. And indeed you can enter the same parameters as with the storage-related commands: FIX 35 or even SCI X are accepted without an error message. But what does this do?
After trying some commands like FIX 20 or SCI 99 it turned out that obviously not only the display-related settings were affected, but also the angular mode which is stored in the following flags. In case you forgot about this: On the '41, the four bits represented by flag 36...39 hold the number of digits, flag 40 is set in FIX mode, flag 41 in ENG mode (both clear means SCI), and flag 42 is set in GRAD resp. flag 43 in RAD (both clear means DEG). So it looks like this: Code: Display Digits FIX ENG GRD RAD For example: Code: Display Digits FIX ENG GRD RAD Here the calculator is set to FIX 5 and Radians mode. Now what does a command do that is not possible on a real hardware HP41? For instance FIX 20, which can be entered on V41 without a problem. I wrote a short program that displays the status of flags 36...43, and here is what I got: First of all, let's assume FIX 4 and DEG mode. This yields... Code: Display Digits FIX ENG GRD RAD What about FIX 15? Code: Display Digits FIX ENG GRD RAD Now for the interesting part. I tried a FIX 20 command: Code: Display Digits FIX ENG GRD RAD From the entered 20 (=10100) the four lowest bits are stored in flag 36...39, and the excessive MSB obviously has spilled into the angular mode section, so that this command turned on Radians mode! Even more interesting: let's see what a few consecutive FIX 20 commands will do: Code: FIX 20 => This is FIX 4 with Grad mode turned on! Code: FIX 20 => One more time: Code: FIX 20 => Until here it looks like each successive FIX 20 counts up the four-bit number in F40...F43 (or at least the three bits in F41...F43). But then, do one last FIX 20: Code: FIX 20 => This is the same result as a few steps before. BTW, if you tried this on V41, be sure to reset its settings to normal by a DEG and FIX 04. So this means:
I have not yet figured out what's exactly happening here inside V41, but I think all this has to be considered a bug that should be corrected. What do you think? Dieter |
|||
05-08-2016, 04:18 PM
(This post was last modified: 05-08-2016 04:19 PM by Massimo Gnerucci.)
Post: #2
|
|||
|
|||
RE: V41 and its display functions
I can only say that V41 8E prompts for a single digit after SCI/FIX/ENG here.
What is your full release number (Help/About)? Other modules loaded? Greetings, Massimo -+×÷ ↔ left is right and right is wrong |
|||
05-08-2016, 04:48 PM
(This post was last modified: 05-08-2016 04:50 PM by Dieter.)
Post: #3
|
|||
|
|||
RE: V41 and its display functions
(05-08-2016 04:18 PM)Massimo Gnerucci Wrote: I can only say that V41 8E prompts for a single digit after SCI/FIX/ENG here. It says exactly what I posted: Virtual HP-41 Release 8 Copyright (c) 1989-2005 Warren Furlow, and (...a list of other contributors) So it's version 8, without any additional letter. (05-08-2016 04:18 PM)Massimo Gnerucci Wrote: Other modules loaded? Yes: Sandmath-IV #4 Bank-Switched 4x4+ P#4 Library - Revision N2 (Experimental) I now removed both modules. And – I can't believe it: FIX, SCI and ENG now show just one underscore and everything works as expected. Plugged both modules back, and the two-digit prompt reappears. You nailed it! So this looks like it's not V41 that's to blame. ;-) Ángel, what do you say? It seems to be the #4 Library. I suppose this is an outdated version. After removing only this library while leaving Sandmath plugged in, V41 turns on with "NO LIBRARY", but the FIX/SCI/ENG prompt has the usual single underscore. Dieter |
|||
05-08-2016, 06:28 PM
Post: #4
|
|||
|
|||
RE: V41 and its display functions
(05-08-2016 04:48 PM)Dieter Wrote:(05-08-2016 04:18 PM)Massimo Gnerucci Wrote: I can only say that V41 8E prompts for a single digit after SCI/FIX/ENG here. Mine says: Virtual HP-41 Release 8E Copyright (c) 1989-2012 Warren Furlow... I'd also update V41 to the latest release. (05-08-2016 04:48 PM)Dieter Wrote:(05-08-2016 04:18 PM)Massimo Gnerucci Wrote: Other modules loaded? Good, let's wait for an answer from Angel. :) Greetings, Massimo -+×÷ ↔ left is right and right is wrong |
|||
05-09-2016, 05:05 AM
(This post was last modified: 05-09-2016 05:11 AM by Ángel Martin.)
Post: #5
|
|||
|
|||
RE: V41 and its display functions
(05-08-2016 06:28 PM)Massimo Gnerucci Wrote:(05-08-2016 04:48 PM)Dieter Wrote: It says exactly what I posted: Hi Guys, sorry to say but the double digits come from the SandMath Module... as an extension to the OS prompts (it affects other functions as well, basically all single-prompts except CAT). The same functionality allows you to perform RCL math right at the RCL prompt with the arithmetic keys, as an example. This behavior is mentioned in the manual, I think (if it's not I should add a warning) Hope that's not a problem Dieter, your post is a great explanation of the effects of such an extension - I saw this as an enhancement (as opposed to something to be blamed for) but I can understand some may not. I could make it user-selectable, say also controlled by the -RCL I/O settings. 'Cheers, 'AM "To live or die by your own sword one must first learn to wield it aptly." |
|||
05-09-2016, 07:39 AM
Post: #6
|
|||
|
|||
RE: V41 and its display functions
Hello, Ángel – thank you very much for your quick reply.
(05-09-2016 05:05 AM)Ángel Martin Wrote: Hi Guys, sorry to say but the double digits come from the SandMath Module... Well... it can cause "unexpected behaviour", as shown above. And even the same command may yield different results. With FIX, SCI, ENG and TONE parameters > 9 will not throw an error but do ..."something" instead. There may be some use for this with TONE, at least if the generated sounds are the ones that would be obtained by a synthetic command with the same suffix (e.g. TONE 26 produces a five-second tone – which seems to be true here). But with the display commands the double digit prompt is potentially dangerous – the user has to take care that the parameter does not exceed 9. While we're at it: Sandmath also has this "Fix Float" mode, similar to the standard display format of other calculators. I tried Pi with different powers of 10 and this is what I got: Code: 3,141592654 So the display is truncated, not rounded (...31415 instead of ...31416). At a certain point the display switches to scientific notation, but with merely one or two significant digits, then back to FIX 9 and then to SCI 9. Is this the way it is supposed to work? Dieter |
|||
05-09-2016, 10:45 AM
(This post was last modified: 05-09-2016 10:46 AM by Ángel Martin.)
Post: #7
|
|||
|
|||
RE: V41 and its display functions
(05-09-2016 07:39 AM)Dieter Wrote: There may be some use for this with TONE, at least if the generated sounds are the ones that would be obtained by a synthetic command with the same suffix (e.g. TONE 26 produces a five-second tone – which seems to be true here). But with the display commands the double digit prompt is potentially dangerous – the user has to take care that the parameter does not exceed 9. Yes, for "power-users" I guess there's no issue :-) (05-09-2016 07:39 AM)Dieter Wrote: While we're at it: Sandmath also has this "Fix Float" mode, similar to the standard display format of other calculators. I see what you've done, as usual pushing the envelope... (and this is a compliment). I didn't expect that "island of SCI" between before turning to the real thing, I should revise the algorithm - I don't remember how I got this done. More to follow... Cheers, ÁM "To live or die by your own sword one must first learn to wield it aptly." |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)