Velocity Reviews > NUMERICAL RECIPES

# NUMERICAL RECIPES

robin
Guest
Posts: n/a

 01-02-2011
"Ron Shepard" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

| I think the
| Numerical Recipes books are excellent introductions to many
| computational problems, including linear algebra. I do agree that
| the code itself that is given in the book is sometimes not the most
| robust, but on the other hand, something like LAPACK code is robust
| but too complicated for a beginner to understand easily.

Numerical Recipes is an authoritative source of information
about a vast number of numerical procedures.

Therefore I endorse Ron Shepherd's remark that it is an
"excellent introductions to many computational problems, including linear algebra".

At more than 1200 pages, and more than 400 propgrams/procedures,
there is something there for everybody.

Three editions have been published.
________________

New in the Third Edition (2007):

* A new chapter on classification and inference,
including such topics as Gaussian mixture models,
hidden Markov modeling, hierarchical clustering
(phylogenetic trees), and support vector machines.
* A new chapter on computational geometry, including
topics like KD trees, quad- and octrees, Delaunay
triangulation and applications, and many useful
algorithms for lines, polygons, triangles, spheres, and
so on.
* Many new statistical distributions, with pdf's, cdf's,
and inverse cdf's
* An expanded treatment of ODEs, emphasizing recent
advances, and with completely new routines
* Much-expanded sections on uniform random
deviates. and on deviates from many other statistical
distributions
* An introduction to spectral and pseudospectral
methods for PDEs
* Interior point methods for linear programming
* More on sparse matrices
* Interpolation on scattered data in multidimensions
* Curve interpolation in multidimensions
* More on Gaussian quadratures and orthogonal
polynomials
* More on accelerating the convergence of series
* Improved incomplete gamma and beta functions,
and new inverse functions
* Improved spherical harmonics and fast spherical
harmonic transforms
* Generalized Fermi-Dirac integrals
* Multivariate Gaussian deviates
* Algorithms and implementations for hash memory
functions
* Incremental quantile estimation
* Chi-square with small numbers of counts
* Dynamic programming
* Hard and soft error correction, and Viterbi decoding
* Eigensystem routines for real, nonsymmetric matrices
* Multitaper methods for power spectral estimation
* Wavelets on the interval
* Information-theoretic properties of distributions
* Markov chain Monte Carlo
* Gaussian process regression and Kriging
* Stochastic simulation of chemical reaction networks
* Code for plotting simple graphs from within programs

bert
Guest
Posts: n/a

 01-02-2011
On Jan 2, 9:03*am, "robin" <(E-Mail Removed)> wrote:
> Numerical Recipes is an authoritative source of information
> about a vast number of numerical procedures.

Maybe so, but the version "Numerical Recipes in C"
was a travesty. Practically all of the C code had
been transliterated quite mindlessly from Fortran,
making hardly any use of C idioms which would
have made the code cleaner and neater. In
particular, there was scarcely any use of pointers.
So authoritative about procedures, maybe, but as
for authoritative about C, absolutely not.
--

robin
Guest
Posts: n/a

 01-02-2011
"bert" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
On Jan 2, 9:03 am, "robin" <(E-Mail Removed)> wrote:

> Numerical Recipes is an authoritative source of information
> about a vast number of numerical procedures.

>Maybe so, but the version "Numerical Recipes in C"
>was a travesty.

Wasn't that published in about 1992?

I clearly stated that I was referring the information and the procedures,
and in particular to the 2007 edition.

> Practically all of the C code had
>been transliterated quite mindlessly from Fortran,
>making hardly any use of C idioms which would
>have made the code cleaner and neater. In
>particular, there was scarcely any use of pointers.

Pointers are probably best avoided.

>So authoritative about procedures, maybe, but as
>for authoritative about C, absolutely not.

It doesn't pretend to be.
The authors clearly state that NR is "NOT [emphasis added]
a textbook on programming, or on best programming practices, or on C++, ..."

Malcolm McLean
Guest
Posts: n/a

 01-02-2011
On Jan 2, 3:29*pm, bert <(E-Mail Removed)> wrote:
>
> Maybe so, but the version "Numerical Recipes in C"
> was a travesty. *Practically all of the C code had
> been transliterated quite mindlessly from Fortran,
>

I've spent many a day rewriting Numerical Recipes code so that it
actually fits with the rest of my C program.

aruzinsky
Guest
Posts: n/a

 01-02-2011
The same thing happened with Collected Algorithms from ACM. Volumes
I, ii and III were nice with many good general purpose algorithms,
although written mostly in algol (see http://en.wikipedia.org/wiki/ALGOL)
and some Fortran. These volumes are a good competitor to Numerical
Recipes. The volumes that followed were too specialized and the
algorithms were on microfiche.

On Jan 2, 8:23*am, Giorgio Pastore <(E-Mail Removed)> wrote:
> On 1/2/11 2:29 PM, bert wrote:
>
> > On Jan 2, 9:03 am, "robin"<(E-Mail Removed)> *wrote:
> >> Numerical Recipes is an authoritative source of information
> >> about a vast number of numerical procedures.

>
> ...
> > So authoritative about procedures, maybe, but as
> > for authoritative about C, absolutely not.
> > --

>
> Actually, I think that Numerical Recipes is a book which progressively
> becomes worse at each new edition.
>
> *From the side of algorithms, the first edition *was doing a pretty good
> job concentrating on a few of them. That way, it was a not-deep but
> modern, honest and readable book on numerical algorithms. A good
> starting point for further readings. The examples in Fortran 77 were not
> enough modular to be included in other codes without some rewriting,
> but, as examples of implementation were reasonably well written.
>
> The last edition has become a huge book which tries to cover almost
> everything. It is true that the original intent was to provide a sort of
> cookbook. But the first edition was a good starting point for everybody
> * wanted to get a feeling *how to become a chef able to prepare a full
> meal. The last one covers too much for a general overview and not so in
> depth to provide a definite guide for each specific topic.
>
> Finally, the authors explicit admission of missing their bets on the
> language evolution is mirrored by codes which progressively tend to use
> less expressively *the underlying languages.
>
> I hope that this trend could be reversed in the future.
>
> Giorgio

nmm1@cam.ac.uk
Guest
Posts: n/a

 01-02-2011
In article <ifqj7c\$ne2\$(E-Mail Removed)-september.org>,
Peter Flass <(E-Mail Removed)> wrote:
>
>I found there was a lot of work translating the algorithms into PL/I
>too, for the same reason. You can't just translate the code
>one-for-one, but have to translate the intent instead.

If that were all As pointed out several times, you often have
to fix the code as well.

>That being said, I've found the first edition quite useful.

Which included the worst random number generators that I had seen
in 25 years of refereeing on that topic - MUCH worse than RANDU.
They started to give wrong answers in trivial, realistic tests
with only 200 numbers.

Regards,
Nick Maclaren.

Peter Flass
Guest
Posts: n/a

 01-02-2011
On 1/2/2011 8:29 AM, bert wrote:
> On Jan 2, 9:03 am, "robin"<(E-Mail Removed)> wrote:
>> Numerical Recipes is an authoritative source of information
>> about a vast number of numerical procedures.

>
> Maybe so, but the version "Numerical Recipes in C"
> was a travesty. Practically all of the C code had
> been transliterated quite mindlessly from Fortran,
> making hardly any use of C idioms which would
> have made the code cleaner and neater. In
> particular, there was scarcely any use of pointers.
> So authoritative about procedures, maybe, but as
> for authoritative about C, absolutely not.
> --

I found there was a lot of work translating the algorithms into PL/I
too, for the same reason. You can't just translate the code
one-for-one, but have to translate the intent instead.

That being said, I've found the first edition quite useful.

glen herrmannsfeldt
Guest
Posts: n/a

 01-02-2011
In comp.lang.fortran bert <(E-Mail Removed)> wrote:
> On Jan 2, 9:03*am, "robin" <(E-Mail Removed)> wrote:
>> Numerical Recipes is an authoritative source of information
>> about a vast number of numerical procedures.

> Maybe so, but the version "Numerical Recipes in C"
> was a travesty. Practically all of the C code had
> been transliterated quite mindlessly from Fortran,
> making hardly any use of C idioms which would
> have made the code cleaner and neater.

(snip)

This one I agree with, though if you go through the routine
how it works. It did that at least once, and it took a while
to get right. (Especially all the loops indexing arrays

-- glen

Seebs
Guest
Posts: n/a

 01-03-2011
On 2011-01-02, robin <(E-Mail Removed)> wrote:
> "bert" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Practically all of the C code had
>>been transliterated quite mindlessly from Fortran,
>>making hardly any use of C idioms which would
>>have made the code cleaner and neater. In
>>particular, there was scarcely any use of pointers.

> Pointers are probably best avoided.

Not in a book that's supposed to be useful to C programmers.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.

robin
Guest
Posts: n/a

 01-03-2011
<(E-Mail Removed)> wrote in message news:ifqhas\$10h\$(E-Mail Removed)...
| In article <ifqj7c\$ne2\$(E-Mail Removed)-september.org>,
| Peter Flass <(E-Mail Removed)> wrote:
| >
| >I found there was a lot of work translating the algorithms into PL/I
| >too, for the same reason. You can't just translate the code
| >one-for-one, but have to translate the intent instead.
|
| If that were all As pointed out several times, you often have
| to fix the code as well.

| >That being said, I've found the first edition quite useful.
|
| Which included the worst random number generators that I had seen
| in 25 years of refereeing on that topic - MUCH worse than RANDU.
| They started to give wrong answers in trivial, realistic tests
| with only 200 numbers.

Again, you are referring to the 1988 (first) edition.
That's 23 years ago. Not particularly relevant.

The current (third) edition provides a range of RNGs
(but, of course, not the latest of George Marsaglia's of 2010).