def scalar(vs, hessian):
    """ M1QN2.A in GL.  EQ 4.1;
        This is L-BFGS when people refers to it.
        wikipedia version of L-BFGS

    """
    assert len(hessian.S) > 0
    s = hessian.S[-1]
    y = hessian.Y[-1]
    ys = hessian.YS[-1]
    yy = hessian.YY[-1]
    D1 = ys / yy
    return D1
