Amp-hour meter -x**.23
Archiver
Posts: 46,084
Tracy, Al, et al:
Solved my problem with computing a power. What I actually needed to compute
was
x**1.237
for x in the range 1 to 100
which makes life much easier.
I fit a 2nd order polynomial to this, then compared the results. Found out
that by splitting the range in to, from x = 1 to 10, and x= 11 to 100,
using a different 2nd order poly for each, I could get a fit to within 1%.
Using Tracy's notes on the "**" operator (which I had never used before), I
was able write a routine that did the above calculation. Works great!
Thanks for the pointers.
Larry
Larry Bradley
Orleans (Ottawa), Ontario, CANADA
Solved my problem with computing a power. What I actually needed to compute
was
x**1.237
for x in the range 1 to 100
which makes life much easier.
I fit a 2nd order polynomial to this, then compared the results. Found out
that by splitting the range in to, from x = 1 to 10, and x= 11 to 100,
using a different 2nd order poly for each, I could get a fit to within 1%.
Using Tracy's notes on the "**" operator (which I had never used before), I
was able write a routine that did the above calculation. Works great!
Thanks for the pointers.
Larry
Larry Bradley
Orleans (Ottawa), Ontario, CANADA