docs: def optimise_newton(x, a, c, tolerance=0.001):
      """
      Optimise value of x using newton gauss
      """
      x_new = x
      x_old = x-1 # dummy value
      while np.abs(x_new - x_old).sum() > tolerance:
          x_old = x_new
          x_new = newton_update(x_old, a, c)
      return x_new