[SciPy-User] Brentq

Robaula helmrp@yahoo....
Fri Jul 27 08:29:30 CDT 2012

The original question had to do with whether the code could produce a value slightly to the left of the bracketing interval. I never had to learn C, and don't like it. But I did pull up the C code, thanks to Joon's pointer to it. I noticed that your comments mention that "the order of xa [the current estimate] and xp [the previous estimate] doesn't matter". Does this mean that xp could be less than xa? If so, then I suppose it could fall slightly to the left of the bracketing interval [xa, xb]?

On Jul 26, 2012, at 8:46 PM, Charles R Harris <charlesr.harris@gmail.com> wrote:

> On Thu, Jul 26, 2012 at 8:33 PM, The Helmbolds <helmrp@yahoo.com> wrote:
> The user guide says the algorithm for brentq should be obvious from inspecting the code.
> <snip>
> I wrote the code, but I would never call it obvious :0 It's rather subtle, and not as clear in its structured form as when written out with gotos since it is best understood as a state machine. The inverse quadratic interpolation isn't the subtle part, it's the control. Note that the form of the interpolation isn't that found in the original paper.
> Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20120727/be7ec660/attachment-0001.html 

More information about the SciPy-User mailing list