More Accurate Parallel Resistance
|
01-26-2014, 10:33 AM
(This post was last modified: 05-29-2017 01:41 PM by Joe Horn.)
Post: #1
|
|||
|
|||
More Accurate Parallel Resistance
A program was recently posted which calculates the total resistance of multiple resistors connected in parallel. Unfortunately it uses the standard definition of the reciprocal of the sum of the reciprocals. That definition often leads to roundoff errors accumulating. For example, the total resistance of a 10 ohm resistor and a 15 ohm resistor conntected in parallel is exactly 6 ohms, but all 12-digit HP calculators (in standard display mode) get 5.99999999999 for 1/(1/10+1/15) because of accumulated roundoff errors.
Here's a more accurate parallel resistance program, called "Pres". It avoids catastrophic accumulation of roundoff errors in all but pathological cases (e.g. many large numbers). It's so simple that it can be entered as a user function. Press the Shift Define key. Type Pres in the Name field, and the following in the Function field: Code: ΠLIST(L)/ΣLIST(ΠLIST(L)/L) To use it, type Pres({list of two or more resistances}). Example: Pres({10,15}) --> 6. Note #1: Search comp.sys.hp48 for a thorough discussion of various methods of finding parallel resistance accurately, such as this one. Roger Rosenbaum and John Meyers shared many insights and discoveries about it over the years. Many pathological examples are also given, showcasing the strengths and weaknesses of each method. The standard definition is the worst. Note #2: Since Prime's CAS performs exact math on integers and ratios of integers, a CAS program would always get the exact answer, even for many huge inputs, if they were all integers or ratios of integers. The above user function is only accurate to 12 digits. <0|ɸ|0> -Joe- |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
More Accurate Parallel Resistance - Joe Horn - 01-26-2014 10:33 AM
RE: "Pres": More Accurate Parallel Resistance - Steve Simpkin - 01-26-2014, 11:46 AM
RE: "Pres": More Accurate Parallel Resistance - Joe Horn - 01-27-2014, 07:31 AM
RE: "Pres": More Accurate Parallel Resistance - René Franquinet - 09-01-2014, 10:20 AM
RE: "Pres": More Accurate Parallel Resistance - Didier Lachieze - 09-01-2014, 10:50 AM
RE: "Pres": More Accurate Parallel Resistance - René Franquinet - 09-01-2014, 02:56 PM
RE: "Pres": More Accurate Parallel Resistance - BERNARD MICHAUD - 01-12-2017, 11:56 PM
|
User(s) browsing this thread: 5 Guest(s)