A balanced view of NR and its critics


Bill Press
03-01-2002, 10:31 PM
There are lots of web postings, and a lot of flaming, on the subject of when to use NR, when not to use it, or even (gasp!) whether it should ever be used at all.

Your NR authors have pretty definite views on that last question, it goes without saying. :)

One particularly balanced discussion, with links to both NR and its critics, is by Norman Gray at Rutherford Appleton Laboratory (U.K.). He has no connection to the Numerical Recipes authors or books, but he seems to "get it" as to what NR is about.

Links to his discussion of NR are
http://www.starlink.rl.ac.uk/star/docs/sc13.htx/node7.html#SECTION00033000000000000000
and
http://www.starlink.rl.ac.uk/star/docs/sc13.htx/node8.html#SECTION00033100000000000000 .

A higher-level page with a top-level link to his "Theory and Modelling Resources Cookbook" is on the page
http://star-www.rl.ac.uk/Documentation/cookbooks.htm

forall
07-15-2002, 09:40 AM
The discussion of NR at the above sites seems down. I have to say I wanted to have a look just to see what kind of arguments one could possibly have against NR - in my experience extremely useful both for learning numerics and also for programming. It is also a pleasure to read! this forum itself is also a great idea.

Dmitri

Bill Press
07-15-2002, 08:10 PM
Thanks for the kind words, Dmitri.
I checked and also find the above links broken. Here (http://www.nr.com/sc13b.pdf) is a link to a PDF file with just the two pages about NR. The fonts don't do well on the screen, but they print OK. (This is now on the NR website, so I will have to remove it if the extract's original authors ask me to do so.)

Cheers,
Bill P.

forall
07-15-2002, 11:04 PM
Bill,
I had a read of the extract. As far as I can tell arguments against NR are only one step away from arguments like "textbooks are bad because they're easy to read, explain the basics and don't offer the ultra-state-of-the-art algorithms".
But even the minority of people who genuinly need these super-fast schemes may benefit from reading NR. Users of black-box libraries may gain speed and some extra-robustness, but if something goes wrong (and nobody could possibly guarantee an approximation will always be 100% reliable) I don't fancy them debugging machine code. One would have no idea even where to begin (unless they understood the algorithms that well - but how many people would?).
So I think NR is a great service for the majority of scientists and engineers that want something clear, reasonably efficient and not too expensive - of course library developers would not be happy :-)
Dmitri

PS. OK, having said all these nice things :-), I do have one question - do you, the authors, use your code and when would you use something else (if at all)?

howardjp
07-31-2002, 02:42 PM
I find a lot of this quite silly. http://math.jpl.nasa.gov/nr/ lists a quote by Shampine, which I found especially distressing. The sad truth is that his book, "Fundamentals of Numerical Computing" was so bad, I had to keep NR next to me just to understand what was going on. Be very wary of those who say NR isn't very good. In many cases, it appears, they are simply trying to sell you their own solution.

Norman Gray
09-30-2004, 11:33 PM
Greetings,

I've just been pointed towards Bill's kind words about my NR summary. Sorry about the broken links (largely due to a change in the way the HTML is generated).

The page Bill pointed to is now at
http://www.starlink.rl.ac.uk/star/docs/sc13.htx/N-a2b3c1.html
and the top-level of the document is at
http://www.starlink.rl.ac.uk/star/docs/sc13.htx/

Should these links break in future (that _shouldn't_ happen, of course), then there's also a stable version on my own pages, at
http://www.astro.gla.ac.uk/users/norman/star/sc13/
and searching for "sc13 cookbook" should find it fairly straightforwardly.

I've no objections to the NR website mirroring the relevant pages, if the authors feel that would be useful.

Best wishes,

Norman

Bill Press
10-01-2004, 04:38 PM
Thanks, Norman!
Bill P.

Foster Morrison
07-06-2005, 09:15 AM
I referenced NR in my own book "The Art of Modeling Dynamic Systems: Forecasting for Chaos, Randomness & Determinism" (Wiley, 1991). I recommended it as a highly readable text, especially for those who have a job to get done and do not have the time or money to get a PhD in numerical analysis or have one such on staff. The coding also is clear, competent, and useful. There are some more sohisticated subroutines to be found, but you can get by using NR for most anything. But as a rule, convert everything to double precision. [Examples: I got a better elliptic integral/function subroutine from IBM years ago. Cholesky factorization is a better way to invert a positive, definite, symmetric matrix. And I converted both NR Julian day subroutines to integer arithmetic.] I use the NR FFT subroutine for time-series analysis and forecasting with my low-pass ramp filter for the trend model. And I modified the NR Chebyshev subroutines to develope an experimental ODE solver based on Chebyshev approximation [see my posting under Ch16 & 17]. I did use Gill's method instead of the NR Runge-Kutta as the "starter," but that was because it was a sentimental favorite that has a few marginal advantages, not because of any big differences.

vivinoodle
12-19-2007, 10:27 PM
I'm not sure why there is such an argument about using numerical recipes to learn or for programming i think it's pretty good and that there should be no such flames.

Great discussion and i think the NR authors made a great job, some times i just don't understand all the hate for other great works.. oh well..
__________________
Vivi ramen noodles (http://www.ramenlicious.com) chef

MPD78
01-12-2009, 06:39 PM
Before I took on a project at work to rewrite about 45 old 1974 FORTRAN programs that are used to design heat exchangers, boilers, economizers, recuperators, gas coolers, etc... I spent all of my time running a little program called ANSYS and one called CFX to perform thermal/structural analysis and to optimize cooling flow paths in complex plastic injection molds. When I firsted started using these programs I was curious to know how they worked and after using them for about 6 months I realized that I had to know how they worked so I could trust their results. NR and one other book entitled "Transport Phenomena" are what helped me understand those commercial codes. Today, I write in VBA in Access and C++ and enjoy it. Once I started to understand the routines in NR and the continuum mechanics in "Transport Phenomena" (the BSL book) everything started to make perfect sense. Anyways, I just wanted to say thanks.