Distressing Rumors, and How We Handle Them

Picture of Wounded NR Author You can see (left) how we feel after reading the incorrect reports of bugs in Numerical Recipes that circulate on the Internet! The Internet is an efficient propagator of "urban legends" (see also the alt.folklore.urban FAQ), like the one about the poodle in the microwave oven, or the Mrs. Fields cookie recipe. There are also several well-known hoaxes concerning viruses on the internet. A different kind of myth that continues to circulate (less-flamboyant than these others, perhaps, but much more distressing to us, as the picture shows) is that Numerical Recipes is "full of bugs".

Our best rebuttal is simply to point to the hundreds of thousands of happy Numerical Recipes users (there are about a quarter-million copies of Numerical Recipes in print). We receive more than a thousand unsolicited pieces of "fan mail" each year, and only a very small number of complaints.

We pay attention to all bug reports, track them down, and fix them. We've been doing this since the very first printing of the first edition in 1986. Problem is, some people keep circulating old lists of bugs and don't correct their lists to reflect the present reality -- and they also include erroneous bug reports in their lists, bugs which (as far as we can tell) never did exist!

Another pattern we notice is the user whose program doesn't work, and who (rather than searching out the real cause) decides to let off steam by posting a virulent attack on some randomly chosen Numerical Recipes routine. These cases are often easy for us to identify, since they frequently mention routines that we know to be correct, but which require a modest degree of mathematical understanding to use correctly (e.g. the Fourier routines)!

If you have a Second Edition version of Numerical Recipes, be sure you keep it updated, using the free upgrade files that can be found elsewhere in our Web pages. (If you have only a First Edition version, it is time to replace it!)

Here is a list of some spurious or long-ago-fixed bugs that we continue to hear about:

  1. svdcmp: bug in very early printings of First Edition, long ago corrected
  2. laguer: very rare failure to converge fixed in Second Edition
  3. random number routines: slight, but genuine, problems in the First Edition routines are completely fixed in the Second Edition
  4. medfit: reported bugs were fixed in the Second Edition; however, like many nonlinear convergences, this algorithm can fail in rare cases.
  5. Fourier routines: persistent reports of bugs, but NOT ONE has proved to be correct. Usually turns out that the bug-reporter hasn't read the book and doesn't understand the ordering of frequency components, or else is allocating C arrays incorrectly (see pp. 18-23 in the C book).
  6. wavelet routines: similar to above. We have no knowledge of any bugs in these routines.
  7. spherical harmonics, Bessel functions: these routines are not "infinitely precise" -- no routines can be! The book correctly discusses their precision, and tells how to get higher precision if you need it.
  8. Shampine's criticisms of ODE routines: These were never bugs, but one researcher's views on the relative merits of algorithms. In fact, the Second Edition incorporates quite a lot of his and related results on stiff ODEs.