class_docstr: 1d-solver generating pairs of approximative root and error.
  
  Needs starting point x0 close to the root.
  Uses modified Newton's method that converges fast regardless of the
  multiplicity of the root.
  
  Pro:
  
  * converges fast for multiple roots
  
  Contra:
  
  * needs first and second derivative of f
  * 3 function evaluations per iteration
class_docstr_tok: ["1d-solver","generating","pairs","of","approximative","root","and","error",".","Needs","starting","point","x0","close","to","the","root",".","Uses","modified","Newton","'s","method","that","converges","fast","regardless","of","the","multiplicity","of","the","root",".","Pro",":","*","converges","fast","for","multiple","roots","Contra",":","*","needs","first","and","second","derivative","of","f","*","3","function","evaluations","per","iteration"]
code: def __init__(self, ctx, f, x0, **kwargs):
      self.ctx = ctx
      if not len(x0) == 1:
          raise ValueError(
              "expected 1 starting point, got %i" % len(x0)
          )
      self.x0 = x0[0]
      self.f = f
      if not "df" in kwargs:
  
          def df(x):
              return self.ctx.diff(f, x)
  
      else:
          df = kwargs["df"]
      self.df = df
      if not "d2f" in kwargs:
  
          def d2f(x):
              return self.ctx.diff(df, x)
  
      else:
          d2f = kwargs["df"]
      self.d2f = d2f
  
imports: from __future__ import print_function
  from copy import copy
  from ..libmp.backend import xrange
label_desc: Use image node_id 1 to create a new MNewton object  with example: obj = MNewton(ctx, f, x0)