(15C) Parallel Resistance, two resistors
|
08-23-2023, 11:52 PM
Post: #1
|
|||
|
|||
(15C) Parallel Resistance, two resistors
An excerpt from EDN magazine, HP-15 program needs fewest strokes, Jon Vicklund, 11/OCT/1990, page 242.
"The program in LISTING 1 takes advantage of a Hewlett-Packard RPN calculator's stack operators to calculate the parallel resistance of two resistors using a minimum number of keystrokes. Listing 1―Minimal-keystroke parallel-resistance calculation for HP-15 calculator R1 ; R1 value ENTER↑ ENTER↑ ; press enter twice R2 ; R2 value ENTER↑ ; enter R↓ ; roll down + ; add X↔Y ;interchange X, Y ÷ ; divide Y by X ÷ ; divide Y by X Display = REQ" BEST! SlideRule |
|||
08-24-2023, 12:31 AM
Post: #2
|
|||
|
|||
RE: (15C) Parallel Resistance, two resistors
It seems like the typical steps shown (4) below to calculate parallel resistance use less keystrokes than the EDN example (8).
R1 1/x R2 1/x + 1/x |
|||
08-24-2023, 01:36 AM
(This post was last modified: 08-24-2023 01:38 AM by Joe Horn.)
Post: #3
|
|||
|
|||
RE: (15C) Parallel Resistance, two resistors
Both programs above return 5.999999999 for values of 15 and 10 in R1 and R2 respectively. The program below returns the correct result of 6.
RCL 1 RCL × 2 RCL 1 RCL + 2 ÷ RTN Optimizing this code is left as an exercise for old PPC members. <0|ɸ|0> -Joe- |
|||
08-24-2023, 03:02 AM
(This post was last modified: 08-24-2023 03:24 AM by Steve Simpkin.)
Post: #4
|
|||
|
|||
RE: (15C) Parallel Resistance, two resistors
This is about the shortest I can come up using the above formula and only the stack.
To use: R1 Enter R2 ---------- Enter Rdn X<>Y (swap X-Y) X Last X Rup + / RTN |
|||
08-25-2023, 03:30 AM
Post: #5
|
|||
|
|||
RE: (15C) Parallel Resistance, two resistors
It's interesting that it was declared as the minimal solution when the obvious solution is shorter:
R1 ENTER ENTER R2 × x↔y LST x + ÷ On the HP-41C we can bring it down to: ST* Z + / And even Joe can be happy with the result. |
|||
08-26-2023, 02:18 PM
Post: #6
|
|||
|
|||
RE: (15C) Parallel Resistance, two resistors
(08-24-2023 01:36 AM)Joe Horn Wrote: Both programs above return 5.999999999 for values of 15 and 10 in R1 and R2 respectively. The program below returns the correct result of 6. Beside the two mentioned equivalent formulae: Req=R1.R2/(R1+R2) and Req=1/(1/R1+1/R2) there is a third (also equivalent) one that I'm using occasionally, even without programming: Req=R1/(1+R1/R2) which is quite convenient when R1 is a multiple of R2, e.g. R1=100k, R2=10k, Req=100k/(1+10) = 9.09k The benefit of the two last formulae is that they can be easily extended to handle multiple parallel resistors: Req=1/(1/R1+1/R2+1/R3+...+1/Rn) or Req=R1/(1+R1/R2+R1/R3+...+R1/Rn) J-F |
|||
08-26-2023, 05:20 PM
Post: #7
|
|||
|
|||
RE: (15C) Parallel Resistance, two resistors | |||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)