Automatic differentiation and the step computation in the limited memory BFGS method