[math-fun] Computer Mathematics Systems (was Computer Algebra Systems)
I still have the 1st edition of "Numerical Recipes" by Press et al., another classic book, and very much to my taste since the programs are written in Fortran, still my favorite language for numerical analysis. Plus I have all the programs on my computer, still good after 22 years (the programs, that is - the computer is a linux x86-64 now). But I see from the web site for the book that it is in its 3rd edition, and the language is now C++ ! Does anyone know if the book has been changed much, and if anything is gained by switching to C++ (which is not a language I'm familiar with)? Neil
On Thursday 06 November 2008, N. J. A. Sloane wrote:
I still have the 1st edition of "Numerical Recipes" by Press et al., another classic book, and very much to my taste since the programs are written in Fortran, still my favorite language for numerical analysis. Plus I have all the programs on my computer, still good after 22 years (the programs, that is - the computer is a linux x86-64 now).
But I see from the web site for the book that it is in its 3rd edition, and the language is now C++ ! Does anyone know if the book has been changed much, and if anything is gained by switching to C++ (which is not a language I'm familiar with)?
The second edition is about 270 pages longer than the first; the third is about 200 pages longer than the second. There have been substantial changes to some sections; for instance, the material about random number generation in the first edition is wretched, and the third edition does much better. For most of the material in NR, Fortran is perfectly adequate, but over the years the amount of not-exactly-numerical code in NR has increased and I'd guess that C++ is a better fit for some of that. (But I don't know for sure, not having read the Fortran version of any edition of NR.) In the first edition, the C was very Fortran-ish (e.g., the authors went through all sorts of contortions so as to be able to pretend that array indices are 1-based rather than 0-based); the second edition's C++ version had somewhat more idiomatic C++, though it didn't make much use of C++-specific language features; the third edition makes a big deal of object orientation and you'd have some learning to do before some of the code would be intelligible. (I've used only C1,C++2,C++3; I think there was also C2 and maybe C++1. For the third edition, C++ is the only language.) -- g
participants (2)
-
Gareth McCaughan -
N. J. A. Sloane