HP Forums
WP 34s registers and integer modes - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: WP 34s registers and integer modes (/thread-3541.html)



WP 34s registers and integer modes - signals - 04-02-2015 04:32 PM

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.


RE: WP 34s registers and integer modes - Marcus von Cube - 04-02-2015 05:40 PM

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...


RE: WP 34s registers and integer modes - signals - 04-02-2015 05:58 PM

(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.


RE: WP 34s registers and integer modes - walter b - 04-08-2015 06:38 AM

(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.

The fact that the stack is handled differently than the registers on mode switches seems a bit surprising, but makes sense.

You find even a bit more information on pp. 273ff of the current manual (available here, reflecting v3.3 build 3778).

d:-)


RE: WP 34s registers and integer modes - Gerald H - 04-08-2015 06:47 AM

(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.

The fact that the stack is handled differently than the registers on mode switches seems a bit surprising, but makes sense.

You find even a bit more information on pp. 273ff of the current manual (available here, reflecting v3.3 build 3778).

d:-)

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.


RE: WP 34s registers and integer modes - signals - 04-10-2015 02:16 AM

(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).

d:-)

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.


RE: WP 34s registers and integer modes - walter b - 04-11-2015 02:43 PM

(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).

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.

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:-)


RE: WP 34s registers and integer modes - signals - 04-11-2015 11:46 PM

(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.

d:-)

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.