Ratio Equation Program - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: Ratio Equation Program (/thread-9012.html) |
Ratio Equation Program - Gamo - 09-08-2017 11:04 AM Found this program on HP Keys Note newsletter about Ratio Equation A/B = C/D With unknown quantity input as Zero and key in the values for A, B, C, and D Program: Quote:LBL A Examples: 13/22 = X/44 13 ENTER 22 ENTER 0 ENTER 44 ---> LBL A = 26 X/22 = 26/44 0 ENTER 22 ENTER 26 ENTER 44 ---> LBL A = 13 Anyone have an idea on how to make this program shorter and program to work for HP 12C since 12C don't have GTO for goto Label. Thank You Gamo RE: Ratio Equation Program - Didier Lachieze - 09-08-2017 11:40 AM (09-08-2017 11:04 AM)Gamo Wrote: Anyone have an idea on how to make this program shorter and Here is a working program on the 12C: Code: 001 x=0? 13/22 = X/44 13 ENTER 22 ENTER 0 ENTER 44 R/S ---> 26 X/22 = 26/44 0 ENTER 22 ENTER 26 ENTER 44 R/S ---> 13 Note: you should not have ENTER after the last number (D) as it would duplicate it in the Y register and you would loose the content of T (A). RE: Ratio Equation Program - Gamo - 09-08-2017 11:54 AM Thank You Didier Lachieze I just edit the last [D] no need to ENTER Your program work very good I try many difference ratio and it all work Thanks Gamo RE: Ratio Equation Program - Didier Lachieze - 09-08-2017 04:09 PM A shorter version (2 steps less): Code: 001 x=0? RE: Ratio Equation Program - Joe Horn - 09-08-2017 11:32 PM Here's an even shorter program that takes the 3 known values, entered on the stack in either clockwise or counterclockwise order, starting from the unknown but skipping it. For example, if this is the equation: \(\frac { 51 }{ 57 } =\frac { 68 }{ x } \), then you'd enter the values either of these two ways: 57 ENTER 51 ENTER 68 [clockwise] 68 ENTER 51 ENTER 57 [counterclockwise] Then run this program: Code: 001 ÷ Of course, cross-multiplying and then dividing also takes only two operations, but I like the circular input pattern of this RPN-friendly method. |