26 #ifndef O2SCL_ROOT_TOMS748_H
27 #define O2SCL_ROOT_TOMS748_H
31 #include <boost/math/tools/roots.hpp>
33 #include <o2scl/root.h>
50 virtual const char *
type() {
return "root_toms748"; }
54 std::pair<double,double> res;
56 if (this->
tol_rel>1.0) digits=1;
57 else if (this->
tol_rel<=0.0) digits=18;
58 else digits=((size_t)(-log10(this->
tol_rel)));
59 boost::math::tools::eps_tolerance<double> tol(digits);
60 size_t niter=((size_t)this->
ntrial);
61 res=boost::math::tools::toms748_solve(func,x1,x2,tol,niter);
int ntrial
Maximum number of iterations (default 100)
One-dimensional bracketing solver [abstract base].
double tol_rel
The maximum value of the functions for success (default )
virtual int solve_bkt(double &x1, double x2, func_t &func)
Solve func using x as an initial guess, returning x.
virtual const char * type()
Return the type, "root_toms748".
int last_ntrial
The number of iterations used in the most recent solve.
Wrapper for Boost 1-d solver.
static const double x2[5]
static const double x1[5]