Post Reply 
(12C) Check if two numbers is to the power of other
09-08-2018, 05:02 AM (This post was last modified: 09-08-2018 10:23 AM by Gamo.)
Post: #14
RE: (12C) Check if two numbers is to the power of other
Thanks to:
Albert Chan
Dieter
Bob
stored

The Y^X function is kind of complicated when use repeatedly in program.
I remember that Dieter mention this many time that when possible use ENTER [x]
is more efficient and Albert Chan also recommended to use ENTER [x] as well.

Remark: Real HP-12C and HP-12C for Android edition is working with [X^Y] loop in program.

Here is the update version specifically for the HP-12C (Platinum) Android edition.

Program:
Code:

001 X≤Y
002 X<>Y
003 X<>Y
004 STO 1
005 X<>Y
006 STO 2
007 CLx
008 STO 3
009 STO 4
010 RCL 1
011 STO 4
012   1 
013 STO 3 
014   1 
015 STO+3 
016 RCL 4   
017 RCL 1 
018   x 
019 STO 4 
020 RCL 2 
021 X≤Y
022 GTO 024 
023 GTO 014 
024 RCL 4   
025 RCL 2 
026   - 
027 X=0   
028 GTO 031 
029   0
030 GTO 00   
031 RCL 2   
032 RCL 3 
033 RCL 1 
034   1 
035 GTO 00

Now program work flawlessly when use [ENTER] [x] instead of [X^Y]

Remark:

When doing the test for example

5 [ENTER] 2 [X^Y] display 25 then input 2 [R/S] display 0 // This is because of the X^Y issue discussed here

Must input directly as 5 [ENTER] 25 [R/S] display 1

Gamo
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (12C) Check if two numbers is to the power of other - Gamo - 09-08-2018 05:02 AM



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