code: static double cubicMinimizer(
  			double u, 
  			double fu, 
  			double du, 
  			double v, 
  			double fv, 
  			double dv
  			) 
  	{
  		double d, theta, p, q, r, s, a, gamma;
  		double cm;
  	    d = v - u;
  	    theta = (fu - fv) * 3 / d + du + dv;
  	    p = abs(theta);
  	    q = abs(du);
  	    r = abs(dv);
  	    s = max(max(p, q), r);
  	    /* gamma = s*sqrt((theta/s)**2 - (du/s) * (dv/s)) */
  	    a = theta / s;
  	    gamma = s * sqrt(a * a - (du / s) * (dv / s));
  	    if ((v) < (u)) gamma = -gamma;
  	    p = gamma - du + theta;
  	    q = gamma - du + gamma + dv;
  	    r = p / q;
  	    cm = u + r * d;
  	    return cm;
  	}
docs: Find a minimizer of an interpolated cubic function.
  @param  u       The value of one point, u.
  @param  fu      The value of f(u).
  @param  du      The value of f'(u).
  @param  v       The value of another point, v.
  @param  fv      The value of f(v).
  @param  du      The value of f'(v).
  @return double	The minimizer of the interpolated cubic.