Re: Value of "e" in the C log() function



In article <49b05484.72648296@xxxxxxxxxxxxxxxxx> cri@xxxxxxxx (Richard Harter) writes:
On Thu, 5 Mar 2009 17:40:41 GMT, "*** T. Winter"
<***.Winter@xxxxxx> wrote:
....
Indeed. On the other hand, Richard Heathfield is right. In general the
approximation is based on a Taylor series, but not centered on the origin.
log(x - 1)/x gives good approximations (after range reduction, of course).
And you would of course not use the Taylor series itself, but truncated
Chebyshev series or Padé approximations or whatever. There is a lot of
literature about the approximation of special functions...

If you are doing a true Tchebyshev expansion you are doing the
integrals rather converting a Taylor expansion into an equivalent
series of Tchebyshev polynomials.

Not needed. You can use a truncated Taylor series where the truncation
error is much less than the error bound wanted (I always used a relative
error of 10^-50). The error of truncating the resulting Chebyshev series
is much larger than the initial truncation error. But you need very high
precision during the calculations of course. One thing I always did take
care of was that if the Taylor was centered on a zero of particular order
I did the approximation always on the Taylor series divided by x with the
appropriate exponent. Some people did not, resulting in an awful relative
precision near the zero.

But then, I'm sure you know all that. The thing is, there is a
lot of difference between the bit of algebra in elementary
calculus and the kind of work that is needful in a quality
function approximation. Many people don't appreciate the
difference.

Indeed. It is good to do a thorough error analysis on your algorithm.
--
*** t. winter, cwi, science park 123, 1098 xg amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~***/
.


Quantcast