(08/12/2009, 02:15 AM)jaydfox Wrote: So I calculate sexp(m*2^p), for m an integer between -64 and 64, for example, and p equal to -108. Because I'm only using reals, convergence is assured. I'm using sexp(0)=0, because Andrew's slog is centered at 0, so I can have slog(sexp(0)) and expect an exact answer.

Anyway, I can then use those 129 points to calculate the various derivatives (actually, I use a matrix inversion that directly gives me the coefficients of the approximated Taylor series). Once I have a Taylor series, I can then move away from the real line.

See the following wikipedia article for the general idea of how the grid of points can be used to get derivatives:

http://en.wikipedia.orirg/wiki/Five-point_stencil

But thats what I asked you. You make an interpolating polynomial through the points sexp(m*2^p) and then you can get the derivatives as the derivatives of the polynomial.

Its described on that wiki page.

Quote:Instead of a 5-point stencil, I use a 129-point stencil. I don't yet have a formula for the coefficients for the stencil, so I have to use a matrix inversion to derive them "the hard way".

Well the interpolating polynomial can be computed as the Lagrange or the Newton Polynomial (with which I was incidentally concerned in the last time considering Ansus formulas)

Lets consider the equidistant Newton interpolation polynomial for points :

where .

To compute the coefficients we need to compute the coefficients of or more specifically the coefficients of , but these are the well know Stirling numbers of the first kind:

Plug this into the Newton formula:

Then we want to have the coefficients at , let

Into the previous formula:

So these are coefficients of the stencil without matrix inversion. In your described case , , , , .

Maybe there is a more symmetric formula but this should at least work.

And you still didnt tell me what FMA means!