More Accurate Parallel Resistance

01262014, 10:33 AM
(This post was last modified: 05292017 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 12digit 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 

01262014, 11:46 AM
Post: #2




RE: "Pres": More Accurate Parallel Resistance
Thank you, Joe. That "catastrophic accumulation of roundoff errors" issue while calculating parallel resistance values has been keeping me up at night lately


01272014, 07:31 AM
Post: #3




RE: "Pres": More Accurate Parallel Resistance
(01262014 11:46 AM)Steve Simpkin Wrote: Thank you, Joe. That "catastrophic accumulation of roundoff errors" issue while calculating parallel resistance values has been keeping me up at night lately Exactly! Being off by 0.00000000001 ohms makes space shuttles explode! >:O More seriously, I was hugely impressed as a youngster at the lengths HP went to in search of excellence and accuracy in their calculators, even worrying about errors in the last digit. And in this case it's very easy to be more accurate, so why not. Even when excellence is not necessary, it's still a fun challenge. <0ɸ0> Joe 

09012014, 10:20 AM
Post: #4




RE: "Pres": More Accurate Parallel Resistance
Gentlemen, call me stupid, but how can I type in a line like
ΠLIST(L)/ΣLIST(ΠLIST(L)/L) ? Look up the Pi and Sigma symbols via the Chars key or is there a more direct way? 

09012014, 10:50 AM
(This post was last modified: 09012014 10:51 AM by Didier Lachieze.)
Post: #5




RE: "Pres": More Accurate Parallel Resistance  
09012014, 02:56 PM
Post: #6




RE: "Pres": More Accurate Parallel Resistance
Indeed, this is the more direct way. Couldn't find it in the manual.
Thank you very much, Didier. 

01122017, 11:56 PM
(This post was last modified: 01142017 05:46 PM by BERNARD MICHAUD.)
Post: #7




RE: "Pres": More Accurate Parallel Resistance
A simple small programs for for those interested, using Joe's formula above which can calculate Series or Parallel Impedances. The program prompts you to enter several resistance and/or impedance values except '0' of course in the List L1 which you usually get by <Shift 7>, and press Enter.
Code: //Program Name SerParImp or your choice. BM 

« Next Oldest  Next Newest »

User(s) browsing this thread: