Boost logo

Boost Users :

From: Shriramana Sharma (samjnaa_at_[hidden])
Date: 2021-01-29 15:54:31


On Thu, Jan 28, 2021 at 10:11 PM Shriramana Sharma <samjnaa_at_[hidden]> wrote:
>
> On Thu, Jan 28, 2021 at 5:57 PM Shriramana Sharma <samjnaa_at_[hidden]> wrote:
> >
> > https://github.com/boostorg/math/blob/develop/include/boost/math/tools/toms748_solve.hpp#L352
> >
> > Can you elucidate which step from the original paper this quadratic
> > step corresponds to?
>
> On more careful examination I see that 4.1.3 and 4.2.3 of the original
> paper have a n == 2 option, which would lead to a compulsory quadratic
> evaluation.

But still as per the paper, the step after such a compulsory quadratic
step would branch into a quadratic_interpolate with count = 3, but in
this implementation such a step is missed. I have no idea whether this
will lead to inaccuracy, since further steps would definitely refine
the bracket, but just placing this on record here.

I was also thrown a bit by the redefinition of max_iter as “The
maximum number of function invocations to perform in the search for
the root”. To my understanding an iteration is defined by the loop in
the algorithm, and the paper speaks of “3 or 4 function evaluations
per iteration”. I realize I'm quibbling at semantics, and one may be
free to either limit the number of iterations or function calls
(mostly the former is done I think) but it may be better to rename the
variable to max_funcalls or such to clarify its purpose and highlight
the deviation from the original paper.

Thanks, and please do respond when you can.

-- 
Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा 𑀰𑁆𑀭𑀻𑀭𑀫𑀡𑀰𑀭𑁆𑀫𑀸

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net