Maurice Lombardi wrote:
... snip ...
I suppose that what Joe has in mind is the replacement of a Taylor series by a Tchebychev polynomial. The drawback of a Taylor series is that to have a given accuracy you need only one term at the origin, but a number of terms which increases when you go farther away from the origin of the development. To have the accuracy you need at the farthest point of the development you need a polynomial of too high a degree, and you get in addition problems of roundoff errors when evaluating this polynomial. A Tchebycheff polynomial have a constant accuracy over the whole range of validity, and for a given accuracy over a given range it is of lower degree than any Taylor series based polynomial in the same range. Even better is the use of a rational function (ratio of two polynomials) as is used in the CEPHES library, for the log1p function in particular.
However the degree and coefficients of this best polynomial depends both on the interval sought and on the accuracy needed. It is different e.g. for single, double, long double, and you cannot simply truncate a given series to different orders. The situation is even worse for a general purpose compiler like gpc which is aimed to work with different word sizes: 64 bits for real or double for most systems, but may be 128 bits for some. Checks would be needed to select the polynomial to use. It is probably better to let this done when possible by a libc library (or an other specialized library like CEPHES) which knows the particular system for which it is built and selects the order and coefficients of the polynomial accordingly. Gpc should give only a less optimized but the most generally valid solution.
A good reference for this is Hastings "Approximations for Digital Computers", which I used to own until some #$%&*@ liberated my copy. You are referring to 'error leveled Tchebychev polynomials'. Try a good library.