Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   NUMERICAL RECIPES (http://www.velocityreviews.com/forums/t741273-numerical-recipes.html)

robin 01-02-2011 09:03 AM

NUMERICAL RECIPES
 
"Ron Shepard" <ron-shepard@NOSPAM.comcast.net> wrote in message
news:ron-shepard-D8FAD0.12525931122010@news60.forteinc.com...

| 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
* Quadrature by variable transformation, and adaptive
quadrature
* 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 01-02-2011 01:29 PM

Re: NUMERICAL RECIPES
 
On Jan 2, 9:03*am, "robin" <robi...@dodo.mapson.com.au> 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 01-02-2011 03:09 PM

Re: NUMERICAL RECIPES
 
"bert" <bert.hutchings@btinternet.com> wrote in message
news:751dd1a0-a2b5-4563-b727-25f551eef7eb@n29g2000vby.googlegroups.com...
On Jan 2, 9:03 am, "robin" <robi...@dodo.mapson.com.au> 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 01-02-2011 04:23 PM

Re: NUMERICAL RECIPES
 
On Jan 2, 3:29*pm, bert <bert.hutchi...@btinternet.com> 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 01-02-2011 05:19 PM

Re: NUMERICAL RECIPES
 
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 <past...@units.it> wrote:
> On 1/2/11 2:29 PM, bert wrote:
>
> > On Jan 2, 9:03 am, "robin"<robi...@dodo.mapson.com.au> *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 01-02-2011 06:49 PM

Re: NUMERICAL RECIPES
 
In article <ifqj7c$ne2$1@news.eternal-september.org>,
Peter Flass <Peter_Flass@Yahoo.com> 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 01-02-2011 07:21 PM

Re: NUMERICAL RECIPES
 
On 1/2/2011 8:29 AM, bert wrote:
> On Jan 2, 9:03 am, "robin"<robi...@dodo.mapson.com.au> 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 01-02-2011 08:39 PM

Re: NUMERICAL RECIPES
 
In comp.lang.fortran bert <bert.hutchings@btinternet.com> wrote:
> On Jan 2, 9:03*am, "robin" <robi...@dodo.mapson.com.au> 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
and fix up those problems, in the end you learn more about
how it works. It did that at least once, and it took a while
to get right. (Especially all the loops indexing arrays
from zero instead of one.)

-- glen

Seebs 01-03-2011 02:34 AM

Re: NUMERICAL RECIPES
 
On 2011-01-02, robin <robin51@dodo.mapson.com.au> wrote:
> "bert" <bert.hutchings@btinternet.com> wrote in message
> news:751dd1a0-a2b5-4563-b727-25f551eef7eb@n29g2000vby.googlegroups.com...
>> 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 / usenet-nospam@seebs.net
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 01-03-2011 11:12 AM

Re: NUMERICAL RECIPES
 
<nmm1@cam.ac.uk> wrote in message news:ifqhas$10h$1@gosset.csi.cam.ac.uk...
| In article <ifqj7c$ne2$1@news.eternal-september.org>,
| Peter Flass <Peter_Flass@Yahoo.com> 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.

Your comments and information are out-of-date.

| >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).




All times are GMT. The time now is 08:02 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57