Re: Polynomial fitting routines?



Steven G. Kargl wrote:

(snip)

I'm looking for an algorithm that will fit a polynomial to
log(x) for 0.25 <= x <= 2 with at least 64-bit precision.
I investigated NSWC Math LIb's pfit.f last night.  pfit.f
worked well on a test on sin(x) and -pi/2 <= x <= pi/2, but
I got horrible results for log(x).

If I remember, it is not usual to write a polynomial in x, but in (x-1) or some other rational function of x such as (x-1)/(x+1).

Try a fit with one of those.

-- glen

.