Can you tell me these equations come from where in MATLAB fmincg.m?
A = 6*(f2-f3)/z3+3*(d2+d3); % cubic fit B = 3*(f3-f2)-z3*(d3+2*d2); z2 = (sqrt(B*B-A*d2*z3*z3)-B)/A;
It is either cubic extrapolation or interpolation. I have looked for these equations in many websites and books of numerical optimization but but I do not find these equations even in the book "Numerical Optimization by Peter Glynn, Stephen M. Robinson p:57". It is not same in the fmincg.m