Differences in powell() code


Maarten de Jong
06-02-2002, 11:10 AM
I've been working my way through the powell() code, and noticed that there have been some minor changes in the code from the book (C, 2nd Ed.), Recipes version 2.06, and Recipes version 2.08, which I now use. The termination criterion has changed (addition of TINY, removal of a fabs()), as well as the criterion to determine the biggest 'del'. Why have these changes been made, and which version should I use?

Saul Teukolsky
06-02-2002, 12:08 PM
Hi Maarten,

These changes to the code are designed to make the routine more robust. For example, adding TINY to the convergence criterion helps in cases where the function value is very close to zero. In general, you can assume that the latest version of the recipes contains the best versions to use.

Best wishes,
Saul Teukolsky