Article View: sci.math.num-analysis
Article #1314Re: Root finding - Bug in Num Recipes
From: Sean Eddy
Date: Thu, 19 Nov 1998 00:00
Date: Thu, 19 Nov 1998 00:00
26 lines
1631 bytes
1631 bytes
Ken Laberteaux <klaberte@trc.tellabs.com> writes: > On p. 373 the line of code which implements Eq 9.5.7 (p. 372) is > > h=Csub(g2,RCmul(2.0,Cdiv(f,b))); > > However Eq 9.5.7 (p. 372) makes no reference of the 2, indicating that > the correct version should be > > h=Csub(g2,Cdiv(f,b)); > > Can anyone shed some light into this inconsistency? It's my (paranoid, perhaps) hypothesis that Numerical Recipes includes harmless obfuscations in their code to protect their copyright, much like Rand McNally introduces harmless small errors in their maps in order to identify illegal copies. I don't know about this particular routine, but based on prior experience with NR, my bet would be that if you follow the logic of the code, the routine is correct -- but in a way that you may not have ever written it had you started from scratch. -- - Sean Eddy - Dept. of Genetics, Washington University in St. Louis - http://www.genetics.wustl.edu/eddy/
Technical Details
Message-ID:
<u9yap7d7uy.fsf@wrasse.wustl.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3653374B.950EFD0F@trc.tellabs.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 107079,9646b0a747ad2fab X-Google-Attributes: gid107079,public X-Google-Thread: 1025b4,9646b0a747ad2fab X-Google-Attributes: gid1025b4,public X-Google-Thread: 1014db,9646b0a747ad2fab X-Google-Attributes: gid1014db,public From: Sean Eddy <eddy@wrasse.wustl.edu> Subject: Re: Root finding - Bug in Num Recipes Date: 1998/11/19 Message-ID: <u9yap7d7uy.fsf@wrasse.wustl.edu> X-Deja-AN: 413893159 References: <3653374B.950EFD0F@trc.tellabs.com> Organization: Washington University in St. Louis Newsgroups: sci.math.num-analysis,comp.lang.c,gnu.misc.discuss