Post Reply 
(12C) Check if two numbers is to the power of other
09-06-2018, 11:00 AM (This post was last modified: 09-06-2018 01:45 PM by Gamo.)
Post: #1
(12C) Check if two numbers is to the power of other
Program to check if the given two numbers is to the power of other.

Procedure:

n1 [ENTER] n2 [R/S] or n2 [ENTER] n1 [R/S]

Display 0 // Two numbers is not the power of the other
Display 1 // Two numbers is the power of the other

When display show 1 user can recheck for base integer, power integer and X^Y result

Display 1
Rv // Base Integer
Rv // Power Interger
Rv // X^Y Answer

Example:

Is base 5 power to 625 ?

5 [ENTER] 625 [R/S] // Number input can switch around 625 [ENTER] 5 [R/S]

1 Display // True
Rv Display 5 // Base Number
Rv Display 4 // Power Number
Rv Display 625 // X^Y result

----------------------------------------------------------------------------------------

Is base 101 power to 104060401 ?

101 [ENTER] 104060401 [R/S]

1 Display // True
Rv Display 101 // Base Number
Rv Display 4 // Power Number
Rv Display 104060401 // X^Y result

----------------------------------------------------------------------------------------

Is base 2 power to 4099 ?

4099 [ENTER] 2 [R/S]

0 Display // Two numbers not a power to other

----------------------------------------------------------------------------------------

Program:
Code:

01 X≤Y
02 X<>Y
03 X<>Y
04 STO 1
05 X<>Y
06 STO 2
07 CLx
08 STO 3
09  1
10 STO+3
11 RCL 3
12 RCL 1
13 X<>Y
14 Y^X
15 STO 4
16 RCL 2
17 X≤Y
18 GTO 20
19 GTO 09
20 RCL 4
21 RCL 2
22  -
23 X=0
24 GTO 27
25  0
26 GTO 00
27 RCL 2
28 RCL 3
29 RCL 1
30  1
31 GTO 00

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


Messages In This Thread
(12C) Check if two numbers is to the power of other - Gamo - 09-06-2018 11:00 AM



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