class_docstr: 1d-solver generating pairs of approximative root and error.
  
  Needs starting points x0 close to the root.
  
  Pro:
  
  * converges fast
  * sometimes more robust than secant with bad second starting point
  
  Contra:
  
  * converges slowly for multiple roots
  * needs first derivative
  * 2 function evaluations per iteration
class_docstr_tok: ["1d-solver","generating","pairs","of","approximative","root","and","error",".","Needs","starting","points","x0","close","to","the","root",".","Pro",":","*","converges","fast","*","sometimes","more","robust","than","secant","with","bad","second","starting","point","Contra",":","*","converges","slowly","for","multiple","roots","*","needs","first","derivative","*","2","function","evaluations","per","iteration"]
code: def __iter__(self):
      f = self.f
      df = self.df
      x0 = self.x0
      while True:
          x1 = x0 - f(x0) / df(x0)
          error = abs(x1 - x0)
          x0 = x1
          yield (x1, error)
  
imports: from __future__ import print_function
  from copy import copy
  from ..libmp.backend import xrange
label_desc: Use image node_id 2 for calling the Newton obj's underlying member method code with example usage: obj.__iter__() without return types