Pierre Hugonnet <[log in to unmask]> asks:
> are there good alternatives to NR ? A text aimed at non-specialists,
> correct algorithms (I mean without theoretical mistakes), simple to
> use routines (I'm aware that simple also often means not the most
> efficient),... ?
There are no books that offer the range of coverage of Numerical Recipes.
There are, of course, excellent texts on numerical analysis, but few aimed
at users, as opposed to those who want to understand all of the details
of the mathematical foundation and implementation.
The broad coverage, and the focus on users as opposed to practitioners,
are things to admire about Numerical Recipes. The mistakes are unfortunate,
but if one believes the authors, they will eventually be corrected. It
may be impossible to eliminate all of the oversimplifications, but it
would certainly be possible to warn readers when the treatment of a topic
is oversimplified.
It should be pointed out that simple-to-use does in no way require that
the underlying algorithm is simplistic. In 1974 I wrote a quadrature code
that unfortunately never got published. To my knowledge, in the domain
it covers (finite region, not too much noise or too many discontinuities),
its performance and reliability have not yet been surpassed. Nonetheless,
its usage is simple: set IOPT(2) = 0 and invoke the procedure using
CALL SINT1 ( A, B, ANSWER, WORK, IOPT ). It needs a subroutine to evaluate
the integrand, with interface SUBROUTINE SINTF ( ANSWER, X, IOPT ). If
a user gets into trouble with the simplest usage, it is possible to select
more sophisticated features by way of IOPT, rather than hunting for (or
writing) a new routine.
It is also the core of a simple-to-use multi-dimensional quadrature routine
that has features I have not seen elsewhere: The integrand can be a function
of an integral, not just another integral, and the limits can be integrals.
Two problems that it solved with ease, that cannot even be posed to any
other routine of which I am aware, arose early after its deployment.
The first had a region that was an annulus, and the integrand was singular
along an ellipse tangent to the inner and outer boundaries of the annulus.
The other was an integral of a function of an integral:
\int_0^{\infty} J_0 ( \frac{\sin \psi}{\epsilon} x ) \exp \left [
- ( \frac{H \cos \psi}{\epsilon} ) ^2 D(x) \right ] x dx,
where
D(x) = \int_1^{\infty} y^{-3+2\mu} \exp \left [ -(\delta y)^2 \right ]
\left [ 1 - J_0(xy) \right ] dy
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|