The formula for relerr is a sanity check, to provide really bad choices
for alpha0. Often, it has not effect. I have changed the formula a little,
and added some comments explaining where it comes from. Steve will post a
patch shortly.

+ // linemin: quadratic line search (adapted from Dennis and Schnabel)
+ // The objective function is approximated by a quadratic
+ // function in alpha, for sufficiently small alpha.
+ // This idea is the same as that used in the well-known secant
+ // method. However, since the change in the objective function
+ // (difference of two finite numbers) is not known as accurately
+ // as the gradient (which is close to zero), all the expressions
+ // are written in terms of gradients. In this way, we can converge
+ // the LAMMPS forces much closer to zero.
+ //
+ // We know E,Eprev,fh,fhprev. The Taylor series about alpha_prev
+ // truncated at the quadratic term is:
+ //
+ // E = Eprev - del_alpha*fhprev + (1/2)del_alpha^2*Hprev
+ //
+ // and
+ //
+ // fh = fhprev - del_alpha*Hprev
+ //
+ // where del_alpha = alpha-alpha_prev
+ //
+ // We solve these two equations for Hprev and E=Esolve, giving:
+ //
+ // Esolve = Eprev - del_alpha*(f+fprev)/2
+ //
+ // We define relerr to be:
+ //
+ // relerr = |(Esolve-E)/Eprev|
+ // = |1.0 - (0.5*del_alpha*(f+fprev)+E)/Eprev|
+ //
+ // If this is accurate to within a reasonable tolerance, then
+ // we go ahead and use a secant step to fh = 0:
+ //
+ // alpha0 = alpha - (alpha-alphaprev)*fh/delfh;
+ //