![]() |
New empirical fit for ln(x) - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: New empirical fit for ln(x) (/thread-235701.html) |
New empirical fit for ln(x) - Namir - 12-11-2012 Hello All, I used my latest best polynomial program to determine the best empirical-polynomial model to fit ln(x) for 1 <= x <= 10. The Excel VBA program performs power-value transformations on x and y (= ln(x)) before using these transformed values in polynomial fits. Thus, the program goes through a large number of transformed-polynomial models. The result is an 8th order polynomial: ln(x) = a0 + a1*y + a2*y^2 + ... + a8*y^8 Where y = sqrt(x). Here is the pseudo code with the values for the coefficients a0 through a8. The maximum absolute error for the fit I obtained is 1.54E-5. I took the values of x using the sequence 1, 1.01, 1.02, 1.03, ..., 9.99, 10.0.
function ln(x) Enjoy! Namir
Edited: 12 Dec 2012, 6:09 a.m.
|