class_docstr: Solve f(x, *args) == 0 using Algorithm748 of Alefeld, Potro & Shi.
      
class_docstr_tok: ["Solve","f","(","x",",","*","args",")","==","0","using","Algorithm748","of","Alefeld",",","Potro","&","Shi","."]
docstr: Prepare for the iterations.
docstr_tok: ["Prepare","for","the","iterations","."]
code: def start(self, f, a, b, args=()):
      r"""Prepare for the iterations."""
      self.function_calls = 0
      self.iterations = 0
  
      self.f = f
      self.args = args
      self.ab[:] = [a, b]
      if not np.isfinite(a) or np.imag(a) != 0:
          raise ValueError("Invalid x value: %s " % (a))
      if not np.isfinite(b) or np.imag(b) != 0:
          raise ValueError("Invalid x value: %s " % (b))
  
      fa = self._callf(a)
      if not np.isfinite(fa) or np.imag(fa) != 0:
          raise ValueError(f"Invalid function value: f({a:f}) -> {fa} ")
      if fa == 0:
          return _ECONVERGED, a
      fb = self._callf(b)
      if not np.isfinite(fb) or np.imag(fb) != 0:
          raise ValueError(f"Invalid function value: f({b:f}) -> {fb} ")
      if fb == 0:
          return _ECONVERGED, b
  
      if np.sign(fb) * np.sign(fa) > 0:
          raise ValueError(
              "f(a) and f(b) must have different signs, but "
              f"f({a:e})={fa:e}, f({b:e})={fb:e} "
          )
      self.fab[:] = [fa, fb]
  
      return _EINPROGRESS, sum(self.ab) / 2.0
  
imports: import warnings
  from collections import namedtuple
  import operator
  from .None import _zeros
  from ._optimize import OptimizeResult, _call_callback_maybe_halt
  import numpy
label_desc: Use image node_id 6 for calling the TOMS748Solver obj's underlying member method code with example usage: obj.start(f, a, b, args) and returns: _EINPROGRESS,  unknown, _ECONVERGED,  a, _ECONVERGED,  b