Clive page remarked (concerning my recent criticism of Numerical Recipes):
> I've seen a number of
> critiques of the algorithms, but most seem to be of the type that I'd call
> "nit-picking". I haven't seen any examples of techniques they advocate
> which are wholly obsolete.
Look at their algorithms for evaluating Bessel functions of the first
kind and orders zero and one. In the edition I studied (around 1988),
the approximations are the ones that can be found in the U. S. Bureau
of Standards (now NIST) publication "Handbook of Mathematical Functions"
(AMS 55), edited by Abramowitz and Stegun. The approximations are due
to Cecil Hastings, and were first published in 1959.
At the time it was published (1964), AMS 55 was a reasonably up-to-date
survey of the field of mathematical functions. At the time Numerical
Recipes was written, much work that superceded what appeared in AMS 55
had already been published. The works of Fullerton (1973), Amos (1977)
Cody (1983) and others on approximation of Bessel functions (and other
special functions) was already well known.
Hastings' approximations are accurate. The problem is that they have
only six digits of precision. Naive users might expect that by re-writing
the algorithms using double-precision arithmetic they may somehow get
values of these functions that have 14 correct digits. At least in the
edition in which I noticed this, I did not find a warning against this
naive assumption. It is possible in newer editions either that more
modern approximations are presented, or caveats are stated.
There are other cases cited in my collection of unsolicited comments
on NR, at http://math.jpl.nasa.gov/nr
Best regards,
Van Snyder
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|