[SciPy-dev] Numerical Recipes (was tagging 0.7rc1 this weekend?)
Charles R Harris
Wed Dec 3 15:36:06 CST 2008
On Wed, Dec 3, 2008 at 1:53 PM, Jarrod Millman <firstname.lastname@example.org> wrote:
> On Wed, Dec 3, 2008 at 12:48 PM, Robert Kern <email@example.com>
> > There's a difference between referencing NR's descriptions of
> > algorithms and translating its code. I suspect that the functions in
> > stats.py, originally written by Gary Perlman, probably fall into the
> > latter category, but the others probably don't. Before pulling out
> > functions, it would be worthwhile to compare our implementations with
> > NR's to see if they in fact do look translated.
> > But do keep in mind that the algorithms are not copyrightable, and the
> > fact that there are only so many ways to implement said algorithms
> > correctly is fairly substantial protection for us.
> Agreed. I don't necessarily think that we need to rip out the
> functions nor simply remove the reference to Numerical Recipes. If it
> turns out that we all ready have (or could easily have with a quick
> rewrite) code that is based on the algorithms described in Numerical
> Recipes (but not *derived* from their code), we should leave them in
> and make sure to clarify in the comments that this is the case.
Especially since much of the code in NR is often a slight rewrite of other
code. For instance, Brent's original was written in Algol-68 and published
in a book among other places. Moler did a nice Fortran version with lots of
gotos, still the easiest to understand IMHO. I did structured version myself
in the 80's, a poor fit, actually, as the algorithm is best regarded as a
finite state machine. NR uses a structured version but I have no idea where
it comes from; their formulas for inverse quadratic extrapolation are
Brent's and not the versions I used, etc., etc.... These things really have
to be checked on a case by case basis and judgement brought to bear. There
is very little that is original in NR except the collection into a book with
explanatory text. That's a major accomplishment but it doesn't render the
code theirs. IIRC, their code for such things as computing elliptic
integrals looked very much "copied" in early editions.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Scipy-dev