Post Reply 
(11C) Ratio Calculation
08-02-2018, 01:15 PM
Post: #1
(11C) Ratio Calculation
Program to calculate ratio of A/B = C/D

Procedure:

Input data clockwise start from any varibles and put zero to one unknown variable.

Example: If C is unknown: A [ENTER] 0 [ENTER] D [ENTER] B

8/10 = 10/X

8 [ENTER] 10 [ENTER] 0 [ENTER] 10 f [A] --> 12.5

Program: Ratio Calculation
Code:

LBL A
Rv
X≠0 ?
GTO A
Rv
>P
Rv
TAN
÷
RTN

Gamo
Find all posts by this user
Quote this message in a reply
08-02-2018, 05:03 PM (This post was last modified: 08-03-2018 11:56 AM by Dieter.)
Post: #2
RE: (10C, 11C, 12C, 15C, 25(C), 33E/C, 34C, 38E/C, 41C, 67/97) Ratio Calculation
(08-02-2018 01:15 PM)Gamo Wrote:  Program to calculate ratio of A/B = C/D

Procedure:

Input data clockwise start from any varibles and put zero to one unknown variable.

I think you should explain what "clockwise" means here.
Maybe this illustrates the idea:

Code:
A   →   C
— ↑ = ↓ —
B   ←   D

To make this more clear you should also choose an example where all values are different (unlike yours where the 10 appears twice):

10 : 20  =  ? : 50

10 [ENTER] 0 [ENTER] 50 [ENTER] 20 [R/S] => 25

(08-02-2018 01:15 PM)Gamo Wrote:  Program: Ratio Calculation

But more important: I wonder why the polar conversion and a tangent are used instead of two simple divisions:

Code:
01 LBL A
02 R↓
03 x≠0?
04 GTO A
05 R↓
06 ÷
07 ÷
08 RTN

This way it can also be made to work on the 12C and other calculators without trig functions. It should also run on the 10C, 25(C), 33E/C and 38E/C.

Code:
01 x=0?
02 GTO 05
03 R↓
04 GTO 01
05 R↓
06 ÷
07 ÷
08 GTO 00

What I still don't like is the error-prone input order. Something like A [ENTER] B [ENTER] C [ENTER] D would be much more intuitive.
Here's a solution that works on the 11C, 15C, 34C, 41C, 67/97 and others:

Code:
01 LBL A
02 X<>Y
03 LBL 1
04 R↓
05 x≠0?
06 GTO 1
07 R↓
08 ÷
09 ÷
10 RTN

10 : 20  =  ? : 50

10 [ENTER] 20 [ENTER] 0 [ENTER] 50 [A] => 25

This improvement can also be implemented for the 10C, 12C, 25(C), 33E/C, 38E/C:

Code:
01 X<>Y
02 x=0?
03 GTO 06
04 R↓
05 GTO 02
06 R↓
07 ÷
08 ÷
09 GTO 00

10 [ENTER] 20 [ENTER] 0 [ENTER] 50 [R/S] => 25

And finally... Gamo, may I humbly ask if this program was ..."inspired" by another one you may have found somewhere ?-)

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




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