Re: Polynomial fitting routines?
- From: kargl@xxxxxxxxxxxxxxxxxxxxxxxxxxxx (Steven G. Kargl)
- Date: Tue, 29 Nov 2005 16:58:15 +0000 (UTC)
In article <quGdnWnhlu9pbhbeRVn-gA@xxxxxxxxxxx>,
glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx> writes:
> 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.
>
Indeed. After revisiting Abramowitz and Stegun's 4.1.26 and
converting pfit.f to double precision, I can find a polynomial
over the range I'm interested. Unfortunately, it only produces
about O(1e-12) relative error on a few test values. This is
much too large for my purposes.
--
Steve
http://troutmask.apl.washington.edu/~kargl/
.
- Follow-Ups:
- Re: Polynomial fitting routines?
- From: glen herrmannsfeldt
- Re: Polynomial fitting routines?
- References:
- Polynomial fitting routines?
- From: Steven G. Kargl
- Re: Polynomial fitting routines?
- From: Herman D . Knoble
- Re: Polynomial fitting routines?
- From: Steven G. Kargl
- Re: Polynomial fitting routines?
- From: glen herrmannsfeldt
- Polynomial fitting routines?
- Prev by Date: Re: printing logical variables as "true" and "false"
- Next by Date: Re: Compaq Visual Fortran discontinued: upgrade to Intel Visual Fortran?
- Previous by thread: Re: Polynomial fitting routines?
- Next by thread: Re: Polynomial fitting routines?
- Index(es):
Relevant Pages
|