WP 34s registers and integer modes
|
04-02-2015, 04:32 PM
Post: #1
|
|||
|
|||
WP 34s registers and integer modes
Greetings,
I'm not sure I'm understanding a behavior on the WP 34s. Integers stored in registers (either local or global) are no longer integers if recalled after DECM. Stack values are OK. Here's a little test program I wrote to demonstrate: LBL 'TST' BASE 10 3 STO 00 DECM RCL 00 END Result: Y: 3 X: 3e-398 The content of R00 is 3e-398 as well. If I shift back to BASE10 the value in X becomes 0 (as you would expect) but the R00 register goes back to 3. I'm either not understanding something critical about integer modes, or I've run into a bug. I don't have my WP 34s yet, so I guess it could be a bug in the emulator, but the Windows and iOS emulators show the same behavior. I'm figuring I just don't understand something about integer representation. Can anyone explain this to me? Thanks. |
|||
04-02-2015, 05:40 PM
Post: #2
|
|||
|
|||
RE: WP 34s registers and integer modes
Not a bug but a feature! Mode switching shouldn't affect stored values because this would essentially destroy their contents. Think of storing PI in R00, switching to integer mode and back to decimal mode. If we'd automatically convert the contents of R00 to integer and back the result would be 3, losing all the digits after the decimal point. The stack is a different case: here we decided to do the conversion.
You can access values in registers stored in the "wrong" format with specialized RCL commands: iRCL treats the register contents as an integer and converts it to decimal if needed. Likewise sRCL treats the register contents as if it was stored in single precision decimal mode. If called from integer mode, the value is dynamically converted. Now guess what dRCL is meant for... Marcus von Cube Wehrheim, Germany http://www.mvcsys.de http://wp34s.sf.net http://mvcsys.de/doc/basic-compare.html |
|||
04-02-2015, 05:58 PM
Post: #3
|
|||
|
|||
RE: WP 34s registers and integer modes
(04-02-2015 05:40 PM)Marcus von Cube Wrote: You can access values in registers stored in the "wrong" format with specialized RCL commands: iRCL treats the register contents as an integer and converts it to decimal if needed. Likewise sRCL treats the register contents as if it was stored in single precision decimal mode. If called from integer mode, the value is dynamically converted. Now guess what dRCL is meant for... Thanks again. Now that I know what to look for, I found this info on page 159 in the manual. As I said in an earlier thread, it's going to take some time, and some dumb questions, to fully understand this thing. There's just so much material in the manual. The fact that the stack is handled differently than the registers on mode switches seems a bit surprising, but makes sense. |
|||
04-08-2015, 06:38 AM
Post: #4
|
|||
|
|||
RE: WP 34s registers and integer modes
(04-02-2015 05:58 PM)signals Wrote: Now that I know what to look for, I found this info on page 159 in the manual. As I said in an earlier thread, it's going to take some time, and some dumb questions, to fully understand this thing. There's just so much material in the manual. You find even a bit more information on pp. 273ff of the current manual (available here, reflecting v3.3 build 3778). d:-) |
|||
04-08-2015, 06:47 AM
Post: #5
|
|||
|
|||
RE: WP 34s registers and integer modes
(04-08-2015 06:38 AM)walter b Wrote:(04-02-2015 05:58 PM)signals Wrote: Now that I know what to look for, I found this info on page 159 in the manual. As I said in an earlier thread, it's going to take some time, and some dumb questions, to fully understand this thing. There's just so much material in the manual. Be wary ordering from createspace - I ordered & received manual version 3.2 instead of 3.3 &, after initially ignoring my complaints, they refused to replace the book with the version I had ordered. The manual itself is excellent. |
|||
04-10-2015, 02:16 AM
Post: #6
|
|||
|
|||
RE: WP 34s registers and integer modes
(04-08-2015 06:38 AM)walter b Wrote: You find even a bit more information on pp. 273ff of the current manual (available here, reflecting v3.3 build 3778). So, I have been wondering... I don't know anything about createspace. If I order a hard copy of the manual do any of the proceeds go to the WP34s team? I don't really need a hard copy, but would be willing to order one if it supports the work on the WP34s and its potential succesor. Thanks. |
|||
04-11-2015, 02:43 PM
Post: #7
|
|||
|
|||
RE: WP 34s registers and integer modes
(04-10-2015 02:16 AM)signals Wrote:(04-08-2015 06:38 AM)walter b Wrote: You find even a bit more information on pp. 273ff of the current manual (available here, reflecting v3.3 build 3778). Please see the new thread about the pdf manual - if you don't need a hardcopy. Also sales of the printed books support "the work on the WP34s and its potential successor" - there's a 355 p. draft manual for the 43S already on the HDD of the author of the printed texts. d:-) |
|||
04-11-2015, 11:46 PM
Post: #8
|
|||
|
|||
RE: WP 34s registers and integer modes
(04-11-2015 02:43 PM)walter b Wrote: Please see the new thread about the pdf manual - if you don't need a hardcopy. Also sales of the printed books support "the work on the WP34s and its potential successor" - there's a 355 p. draft manual for the 43S already on the HDD of the author of the printed texts. Thanks for the info. Just wanted to make sure that the author would see part of the money I gave Createspace. I said I didn't need a hardcopy, but that doesn't mean I don't want one. So I just placed an order. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)