The present author investigated the use of more Gauss points to
produce an algorithm that would have maximum errors near
(double precision). In order to avoid very high numbers of Gauss
points when
, a higher order Taylor expansion can be used
in (5). Adding one more term to this expansion yields
If this modification is incorporated into equation (6)
then a 20-point Gauss-Legendre rule used with the modified equation
(6) for
, and used with equation (3) for
results in a maximum absolute error less than
in double precision.
A more efficient algorithm can be constructed by selecting Gauss rules
with fewer points for the smaller values of
.
It was found, for example, that if the algorithm is modified to use
only six points for
and twelve points for
then the same level of accuracy
could be maintained. These final modifications were incorporated into the
Fortran implementation that is available from the author. Further refinements
are obviously possible, at the expense of additional implementation
complexity.