(12C) Base Conversion
08-25-2018, 08:38 PM
Post: #5
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
RE: (12C) Base Conversion
(08-25-2018 06:38 PM)Albert Chan Wrote:  My first time beaten by this type of "feature" is with RCL (Yes, it is also documented)
Say, 5 is stored in memory 0, with a clear stack:

5 * 5: RCL 0 Enter x => 25 -- so far so good
5 * 4: RCL 0 Enter 1 - x => 100 -- ???

This behaviour is completely logical and the way all RPN HPs are supposed to work.

Code:
T    0     0     0 Z    0     0     0 Y    0     5     0 X    5     5    25    RCL 0  ENTER  x

Continue with the second one:

Code:
T    0     0     0     0    0 Z    0    25    25     0    0 Y   25     5     5    25    0 X    5     5     1     4  100    RCL 0  ENTER  1     -    x

You see that the "1" overwrites X because ENTER disables the stack lift.
Add a second ENTER and it will work as you have intended.

On the other hand in the first example ENTER is directly followed by the multiplication, so X and Y are multiplied and you get x².

I think it is fine this way.

Dieter
 « Next Oldest | Next Newest »

 Messages In This Thread (12C) Base Conversion - Thomas Klemm - 08-25-2018, 02:32 PM RE: (12C) Base Conversion - rprosperi - 08-25-2018, 05:28 PM RE: (12C) Base Conversion - Albert Chan - 08-25-2018, 06:38 PM RE: (12C) Base Conversion - Dieter - 08-25-2018 08:38 PM RE: (12C) Base Conversion - rprosperi - 08-25-2018, 09:02 PM RE: (12C) Base Conversion - Albert Chan - 08-25-2018, 11:06 PM RE: (12C) Base Conversion - Thomas Klemm - 08-25-2018, 08:30 PM RE: (12C) Base Conversion - Thomas Klemm - 08-27-2018, 08:29 PM

User(s) browsing this thread: 1 Guest(s)