|
|
|
|
|
by Silhouette
3778 days ago
|
|
This or a variation is on almost every physicist's shelf I know... Unfortunately, that is a significant part of the problem. Numerical Recipes was an OK book for its time, and certainly a popular one given the limited material available in the field. However, neither the recipes themselves nor the book's general presentation are ideal today, and in many cases, someone interested in implementing robust, efficient algorithms for various mathematical constructs would do better now to read other sources. For example, substantial linear algebra computations are probably going to use some variation of BLAS/LAPACK today. There is also a lot of background material available about the algorithms used within these libraries and the underlying mathematical foundations, for those who need to implement something a little different or who are simply curious. In most fields, and excluding those who are actually writing this kind of mathematical library, a programmer will do better to use the tools that are already freely available today rather than trying to implement their own code based on ideas from Numerical Recipes. |
|
NR is hugely helpful. One example a few years ago I needed to implement technique from a math paper in some C code.
The paper included such classic math terms like "Tridiagonal Matrix" and "Cholesky Decomposition" I'm sure they mean a lot to someone with a math background but baffled me at the time.
It wasn't until I pulled out my handy copy of NR I was able to even slightly wrap my head around just what the hell a "Cholesky Decomposition" even was. Let alone how I would code it. And even then I had to dredge up my old Linear Algebra textbook from Uni to re familiarise myself with basic Matrix operations.
The code I wrote ended up being full of comments like this:
"/* Newton's method to compute positive root f(p)^2 = (u^T)(Q^T)(D^2)Qu and F(dF/dp) = (u^T)(Q^T)(D^2)Q(du/dp) */ "
Which is basically me trying to wrap my head around just what the hell the mathematical paper is talking about whilst writing the algorithm programatically.
Even now opening the .C file some years later it took me a few minutes to make sense of that comment I had to realise that U^T was shorthand for transpose of Matrix U.
Numerical techniques are hugely complicated especially when you don't deal with them every day I have yet to find a book better than NR at breaking them down and presenting them in a way someone like me (with Science/Eng background) can understand them.
I'll gladly take any recommendations you have for updated references. As far as I know NR and the GSL (GNU scientific library) documentation are considered the gold standard by all my peers.